home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / GXPrinting.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  126.1 KB  |  2,985 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        GXPrinting.h
  3.  
  4.      Contains:    This file contains all printing APIs except for driver/extension specific ones.
  5.  
  6.      Version:    Technology:    Quickdraw GX 1.1
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __GXPRINTING__
  19. #define __GXPRINTING__
  20.  
  21. #ifndef __CONDITIONALMACROS__
  22. #include <ConditionalMacros.h>
  23. #endif
  24. #ifndef __COLLECTIONS__
  25. #include <Collections.h>
  26. #endif
  27. #ifndef __DIALOGS__
  28. #include <Dialogs.h>
  29. #endif
  30. #ifndef __ERRORS__
  31. #include <Errors.h>
  32. #endif
  33. #ifndef __FILES__
  34. #include <Files.h>
  35. #endif
  36. #ifndef __GXFONTS__
  37. #include <GXFonts.h>
  38. #endif
  39. #ifndef __GXMATH__
  40. #include <GXMath.h>
  41. #endif
  42. #ifndef __GXTYPES__
  43. #include <GXTypes.h>
  44. #endif
  45. #ifndef __LISTS__
  46. #include <Lists.h>
  47. #endif
  48. #ifndef __MENUS__
  49. #include <Menus.h>
  50. #endif
  51. #ifndef __GXMESSAGES__
  52. #include <GXMessages.h>
  53. #endif
  54. #ifndef __PRINTING__
  55. #include <Printing.h>
  56. #endif
  57. #ifndef __QUICKDRAW__
  58. #include <Quickdraw.h>
  59. #endif
  60.  
  61.  
  62.  
  63. #if PRAGMA_ONCE
  64. #pragma once
  65. #endif
  66.  
  67. #ifdef __cplusplus
  68. extern "C" {
  69. #endif
  70.  
  71. #if PRAGMA_IMPORT
  72. #pragma import on
  73. #endif
  74.  
  75. #if PRAGMA_STRUCT_ALIGN
  76.     #pragma options align=mac68k
  77. #elif PRAGMA_STRUCT_PACKPUSH
  78.     #pragma pack(push, 2)
  79. #elif PRAGMA_STRUCT_PACK
  80.     #pragma pack(2)
  81. #endif
  82.  
  83. /********************************************************************
  84.                     Start of old "GXPrintingManager.h/a/p" interface file.
  85.             *********************************************************************/
  86. /* ------------------------------------------------------------------------------
  87.  
  88.                             Printing Manager API Contants and Types
  89.  
  90. -------------------------------------------------------------------------------- */
  91.  
  92. typedef unsigned long                     gxOwnerSignature;
  93. #if OLDROUTINENAMES
  94. typedef unsigned long                     Signature;
  95. #endif  /* OLDROUTINENAMES */
  96.  
  97. /*
  98.  
  99.     ABSTRACT DATA TYPES
  100.  
  101. */
  102. /*
  103.    typedef struct gxPrivatePrinterRecord *gxPrinter;
  104.    typedef struct gxPrivateJobRecord *gxJob;
  105.    typedef struct gxPrivateFormatRecord *gxFormat;
  106.    typedef struct gxPrivatePaperTypeRecord *gxPaperType;
  107.    typedef struct gxPrivatePrintFileRecord *gxPrintFile;
  108. */
  109.  
  110. typedef struct OpaquegxPrinter*         gxPrinter;
  111. typedef struct OpaquegxJob*             gxJob;
  112. typedef struct OpaquegxFormat*             gxFormat;
  113. typedef struct OpaquegxPaperType*         gxPaperType;
  114. typedef struct OpaquegxPrintFile*         gxPrintFile;
  115. /* Possible values for LoopStatus */
  116. typedef Boolean                         gxLoopStatus;
  117.  
  118. enum {
  119.     gxStopLooping                = false,
  120.     gxKeepLooping                = true
  121. };
  122.  
  123. typedef CALLBACK_API( gxLoopStatus , GXViewDeviceProcPtr )(gxViewDevice aViewDevice, void *refCon);
  124. typedef STACK_UPP_TYPE(GXViewDeviceProcPtr)                     GXViewDeviceUPP;
  125. enum { uppGXViewDeviceProcInfo = 0x000003D0 };                     /* pascal 1_byte Func(4_bytes, 4_bytes) */
  126. #define NewGXViewDeviceProc(userRoutine)                         (GXViewDeviceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXViewDeviceProcInfo, GetCurrentArchitecture())
  127. #define CallGXViewDeviceProc(userRoutine, aViewDevice, refCon)     CALL_TWO_PARAMETER_UPP((userRoutine), uppGXViewDeviceProcInfo, (aViewDevice), (refCon))
  128. typedef CALLBACK_API( gxLoopStatus , GXFormatProcPtr )(gxFormat aFormat, void *refCon);
  129. typedef STACK_UPP_TYPE(GXFormatProcPtr)                         GXFormatUPP;
  130. enum { uppGXFormatProcInfo = 0x000003D0 };                         /* pascal 1_byte Func(4_bytes, 4_bytes) */
  131. #define NewGXFormatProc(userRoutine)                             (GXFormatUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFormatProcInfo, GetCurrentArchitecture())
  132. #define CallGXFormatProc(userRoutine, aFormat, refCon)             CALL_TWO_PARAMETER_UPP((userRoutine), uppGXFormatProcInfo, (aFormat), (refCon))
  133. typedef CALLBACK_API( gxLoopStatus , GXPaperTypeProcPtr )(gxPaperType aPapertype, void *refCon);
  134. typedef STACK_UPP_TYPE(GXPaperTypeProcPtr)                         GXPaperTypeUPP;
  135. enum { uppGXPaperTypeProcInfo = 0x000003D0 };                     /* pascal 1_byte Func(4_bytes, 4_bytes) */
  136. #define NewGXPaperTypeProc(userRoutine)                         (GXPaperTypeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPaperTypeProcInfo, GetCurrentArchitecture())
  137. #define CallGXPaperTypeProc(userRoutine, aPapertype, refCon)     CALL_TWO_PARAMETER_UPP((userRoutine), uppGXPaperTypeProcInfo, (aPapertype), (refCon))
  138. typedef CALLBACK_API( OSErr , GXPrintingFlattenProcPtr )(long size, void *data, void *refCon);
  139. typedef STACK_UPP_TYPE(GXPrintingFlattenProcPtr)                 GXPrintingFlattenUPP;
  140. enum { uppGXPrintingFlattenProcInfo = 0x00000FE0 };             /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  141. #define NewGXPrintingFlattenProc(userRoutine)                     (GXPrintingFlattenUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPrintingFlattenProcInfo, GetCurrentArchitecture())
  142. #define CallGXPrintingFlattenProc(userRoutine, size, data, refCon)  CALL_THREE_PARAMETER_UPP((userRoutine), uppGXPrintingFlattenProcInfo, (size), (data), (refCon))
  143. #if OLDROUTINENAMES
  144. typedef GXViewDeviceProcPtr             gxViewDeviceProc;
  145. typedef GXFormatProcPtr                 gxFormatProc;
  146. typedef GXPaperTypeProcPtr                 gxPaperTypeProc;
  147. typedef GXPrintingFlattenProcPtr         gxPrintingFlattenProc;
  148. #endif  /* OLDROUTINENAMES */
  149.  
  150. /*
  151.     The following constants are used to set collection item flags in printing
  152.     collections. The Printing Manager purges certain items whenever a driver
  153.     switch occurs. If the formatting driver changes, all items marked as
  154.     gxVolatileFormattingDriverCategory will be purged.  If the output driver
  155.     changes, all items marked as gxVolatileOutputDriverCategory will be purged.
  156.     Note that to prevent items from being flattened when GXFlattenJob is called,
  157.     you should unset the collectionPersistenceBit (defined in Collections.h),
  158.     which is on by default.
  159. */
  160. /* Structure stored in collection items' user attribute bits */
  161. typedef short                             gxCollectionCategory;
  162.  
  163. enum {
  164.     gxNoCollectionCategory        = 0x0000,
  165.     gxOutputDriverCategory        = 0x0001,
  166.     gxFormattingDriverCategory    = 0x0002,
  167.     gxDriverVolatileCategory    = 0x0004,
  168.     gxVolatileOutputDriverCategory = gxOutputDriverCategory + gxDriverVolatileCategory,
  169.     gxVolatileFormattingDriverCategory = gxFormattingDriverCategory + gxDriverVolatileCategory
  170. };
  171.  
  172.  
  173. /*
  174.  
  175.     >>>>>> JOB COLLECTION ITEMS <<<<<<
  176.  
  177. */
  178.  
  179. /* gxJobInfo COLLECTION ITEM */
  180.  
  181. enum {
  182.     gxJobTag                    = FOUR_CHAR_CODE('job ')
  183. };
  184.  
  185. struct gxJobInfo {
  186.     long                             numPages;                    /* Number of pages in the document */
  187.     long                             priority;                    /* Priority of this job plus "is it on hold?" */
  188.     unsigned long                     timeToPrint;                /* When to print job, if scheduled */
  189.     long                             jobTimeout;                    /* Timeout value, in ticks */
  190.     long                             firstPageToPrint;            /* Start printing from this page */
  191.     short                             jobAlert;                    /* How to alert user when printing */
  192.     Str31                             appName;                    /* Which application printed the document */
  193.     Str31                             documentName;                /* The name of the document being printed */
  194.     Str31                             userName;                    /* The owner name of the machine that printed the document */
  195. };
  196. typedef struct gxJobInfo gxJobInfo;
  197.  
  198. /* gxPDDDefaultSettingTag COLLECTION ITEM */
  199.  
  200. enum {
  201.     gxPDDDefaultSettingTag        = FOUR_CHAR_CODE('pdds')
  202. };
  203.  
  204. struct gxPDDDefaultSettingInfo {
  205.     Boolean                         useDefaultSetting;            /* true if PDD default setting should be used */
  206.     SInt8                             pad;
  207. };
  208. typedef struct gxPDDDefaultSettingInfo gxPDDDefaultSettingInfo;
  209.  
  210. /* priority field constants */
  211.  
  212. enum {
  213.     gxPrintJobHoldingBit        = 0x00001000                    /* This bit is set if the job is on hold. */
  214. };
  215.  
  216.  
  217. enum {
  218.     gxPrintJobUrgent            = 0x00000001,
  219.     gxPrintJobAtTime            = 0x00000002,
  220.     gxPrintJobASAP                = 0x00000003,
  221.     gxPrintJobHolding            = (gxPrintJobHoldingBit + gxPrintJobASAP),
  222.     gxPrintJobHoldingAtTime        = (gxPrintJobHoldingBit + gxPrintJobAtTime),
  223.     gxPrintJobHoldingUrgent        = (gxPrintJobHoldingBit + gxPrintJobUrgent)
  224. };
  225.  
  226. /* jobAlert field constants */
  227.  
  228. enum {
  229.     gxNoPrintTimeAlert            = 0,                            /* Don't alert user when we print */
  230.     gxAlertBefore                = 1,                            /* Alert user before we print */
  231.     gxAlertAfter                = 2,                            /* Alert user after we print */
  232.     gxAlertBothTimes            = 3                                /* Alert before and after we print */
  233. };
  234.  
  235. /* jobTimeout field constants */
  236.  
  237. enum {
  238.     gxThirtySeconds                = 1800,                            /* 30 seconds in ticks */
  239.     gxTwoMinutes                = 7200                            /* 2 minutes in ticks */
  240. };
  241.  
  242.  
  243. /* gxCollationTag COLLECTION ITEM */
  244.  
  245. enum {
  246.     gxCollationTag                = FOUR_CHAR_CODE('sort')
  247. };
  248.  
  249. struct gxCollationInfo {
  250.     Boolean                         collation;                    /* True if copies are to be collated */
  251.     char                             padByte;
  252. };
  253. typedef struct gxCollationInfo gxCollationInfo;
  254.  
  255.  
  256. /* gxCopiesTag COLLECTION ITEM */
  257.  
  258. enum {
  259.     gxCopiesTag                    = FOUR_CHAR_CODE('copy')
  260. };
  261.  
  262. struct gxCopiesInfo {
  263.     long                             copies;                        /* Number of copies of the document to print */
  264. };
  265. typedef struct gxCopiesInfo gxCopiesInfo;
  266.  
  267.  
  268. /* gxPageRangeTag COLLECTION ITEM */
  269.  
  270. enum {
  271.     gxPageRangeTag                = FOUR_CHAR_CODE('rang')
  272. };
  273.  
  274. struct gxSimplePageRangeInfo {
  275.     char                             optionChosen;                /* From options listed below */
  276.     Boolean                         printAll;                    /* True if user wants to print all pages */
  277.     long                             fromPage;                    /* For gxDefaultPageRange, current value */
  278.     long                             toPage;                        /* For gxDefaultPageRange, current value */
  279. };
  280. typedef struct gxSimplePageRangeInfo gxSimplePageRangeInfo;
  281.  
  282. struct gxPageRangeInfo {
  283.     gxSimplePageRangeInfo             simpleRange;                /* Info which will be returned for GetJobPageRange */
  284.     Str31                             fromString;                    /* For gxCustomizePageRange, current value */
  285.     Str31                             toString;                    /* For gxCustomizePageRange, current value */
  286.     long                             minFromPage;                /* For gxDefaultPageRange, we parse with this, ignored if nil */
  287.     long                             maxToPage;                    /* For gxDefaultPageRange, we parse with this, ignored if nil */
  288.     char                             replaceString[1];            /* For gxReplacePageRange, string to display */
  289. };
  290. typedef struct gxPageRangeInfo gxPageRangeInfo;
  291.  
  292.  
  293. /* optionChosen field constants for SimplePageRangeInfo */
  294.  
  295. enum {
  296.     gxDefaultPageRange            = 0,
  297.     gxReplacePageRange            = 1,
  298.     gxCustomizePageRange        = 2
  299. };
  300.  
  301.  
  302. /* gxQualityTag COLLECTION ITEM */
  303.  
  304. enum {
  305.     gxQualityTag                = FOUR_CHAR_CODE('qual')
  306. };
  307.  
  308. struct gxQualityInfo {
  309.     Boolean                         disableQuality;                /* True to disable standard quality controls */
  310.     char                             padByte;
  311.     short                             defaultQuality;                /* The default quality value */
  312.     short                             currentQuality;                /* The current quality value */
  313.     short                             qualityCount;                /* The number of quality menu items in popup menu */
  314.     char                             qualityNames[1];            /* An array of packed pascal strings for popup menu titles */
  315. };
  316. typedef struct gxQualityInfo gxQualityInfo;
  317.  
  318.  
  319. /* gxFileDestinationTag COLLECTION ITEM */
  320.  
  321. enum {
  322.     gxFileDestinationTag        = FOUR_CHAR_CODE('dest')
  323. };
  324.  
  325. struct gxFileDestinationInfo {
  326.     Boolean                         toFile;                        /* True if destination is a file */
  327.     char                             padByte;
  328. };
  329. typedef struct gxFileDestinationInfo gxFileDestinationInfo;
  330.  
  331.  
  332. /* gxFileLocationTag COLLECTION ITEM */
  333.  
  334. enum {
  335.     gxFileLocationTag            = FOUR_CHAR_CODE('floc')
  336. };
  337.  
  338. struct gxFileLocationInfo {
  339.     FSSpec                             fileSpec;                    /* Location to put file, if destination is file */
  340. };
  341. typedef struct gxFileLocationInfo gxFileLocationInfo;
  342.  
  343.  
  344. /* gxFileFormatTag COLLECTION ITEM */
  345.  
  346. enum {
  347.     gxFileFormatTag                = FOUR_CHAR_CODE('ffmt')
  348. };
  349.  
  350. struct gxFileFormatInfo {
  351.     Str31                             fileFormatName;                /* Name of file format (e.g. "PostScript") if destination is file */
  352. };
  353. typedef struct gxFileFormatInfo gxFileFormatInfo;
  354.  
  355.  
  356. /* gxFileFontsTag COLLECTION ITEM */
  357.  
  358. enum {
  359.     gxFileFontsTag                = FOUR_CHAR_CODE('incf')
  360. };
  361.  
  362. struct gxFileFontsInfo {
  363.     char                             includeFonts;                /* Which fonts to include, if destination is file */
  364.     char                             padByte;
  365. };
  366. typedef struct gxFileFontsInfo gxFileFontsInfo;
  367.  
  368. /* includeFonts field constants */
  369.  
  370. enum {
  371.     gxIncludeNoFonts            = 1,                            /* Include no fonts */
  372.     gxIncludeAllFonts            = 2,                            /* Include all fonts */
  373.     gxIncludeNonStandardFonts    = 3                                /* Include only fonts that aren't in the standard LW set */
  374. };
  375.  
  376.  
  377. /* gxPaperFeedTag COLLECTION ITEM */
  378.  
  379. enum {
  380.     gxPaperFeedTag                = FOUR_CHAR_CODE('feed')
  381. };
  382.  
  383. struct gxPaperFeedInfo {
  384.     Boolean                         autoFeed;                    /* True if automatic feed, false if manual */
  385.     char                             padByte;
  386. };
  387. typedef struct gxPaperFeedInfo gxPaperFeedInfo;
  388.  
  389.  
  390. /* gxTrayFeedTag COLLECTION ITEM */
  391.  
  392. enum {
  393.     gxTrayFeedTag                = FOUR_CHAR_CODE('tray')
  394. };
  395.  
  396. typedef long                             gxTrayIndex;
  397. struct gxTrayFeedInfo {
  398.     gxTrayIndex                     feedTrayIndex;                /* Tray to feed paper from */
  399.     Boolean                         manualFeedThisPage;            /* Signals manual feeding for the page */
  400.     char                             padByte;
  401. };
  402. typedef struct gxTrayFeedInfo gxTrayFeedInfo;
  403.  
  404.  
  405. /* gxManualFeedTag COLLECTION ITEM */
  406.  
  407. enum {
  408.     gxManualFeedTag                = FOUR_CHAR_CODE('manf')
  409. };
  410.  
  411. struct gxManualFeedInfo {
  412.     long                             numPaperTypeNames;            /* Number of paperTypes to manually feed */
  413.     Str31                             paperTypeNames[1];            /* Array of names of paperTypes to manually feed */
  414. };
  415. typedef struct gxManualFeedInfo gxManualFeedInfo;
  416.  
  417.  
  418. /* gxNormalMappingTag COLLECTION ITEM */
  419.  
  420. enum {
  421.     gxNormalMappingTag            = FOUR_CHAR_CODE('nmap')
  422. };
  423.  
  424. struct gxNormalMappingInfo {
  425.     Boolean                         normalPaperMapping;            /* True if not overriding normal paper mapping */
  426.     char                             padByte;
  427. };
  428. typedef struct gxNormalMappingInfo gxNormalMappingInfo;
  429.  
  430.  
  431. /* gxSpecialMappingTag COLLECTION ITEM */
  432.  
  433. enum {
  434.     gxSpecialMappingTag            = FOUR_CHAR_CODE('smap')
  435. };
  436.  
  437. struct gxSpecialMappingInfo {
  438.     char                             specialMapping;                /* Enumerated redirect, scale or tile setting */
  439.     char                             padByte;
  440. };
  441. typedef struct gxSpecialMappingInfo gxSpecialMappingInfo;
  442.  
  443. /* specialMapping field constants */
  444.  
  445. enum {
  446.     gxRedirectPages                = 1,                            /* Redirect pages to a papertype and clip if necessary */
  447.     gxScalePages                = 2,                            /* Scale pages if necessary */
  448.     gxTilePages                    = 3                                /* Tile pages if necessary */
  449. };
  450.  
  451.  
  452. /* gxTrayMappingTag COLLECTION ITEM */
  453.  
  454. enum {
  455.     gxTrayMappingTag            = FOUR_CHAR_CODE('tmap')
  456. };
  457.  
  458. struct gxTrayMappingInfo {
  459.     gxTrayIndex                     mapPaperToTray;                /* Tray to map all paper to */
  460. };
  461. typedef struct gxTrayMappingInfo gxTrayMappingInfo;
  462.  
  463.  
  464. /* gxPaperMappingTag COLLECTION ITEM */
  465. /* This collection item contains a flattened paper type resource */
  466.  
  467. enum {
  468.     gxPaperMappingTag            = FOUR_CHAR_CODE('pmap')
  469. };
  470.  
  471.  
  472. /* gxPrintPanelTag COLLECTION ITEM */
  473.  
  474. enum {
  475.     gxPrintPanelTag                = FOUR_CHAR_CODE('ppan')
  476. };
  477.  
  478. struct gxPrintPanelInfo {
  479.     Str31                             startPanelName;                /* Name of starting panel in Print dialog */
  480. };
  481. typedef struct gxPrintPanelInfo gxPrintPanelInfo;
  482.  
  483.  
  484. /* gxFormatPanelTag COLLECTION ITEM */
  485.  
  486. enum {
  487.     gxFormatPanelTag            = FOUR_CHAR_CODE('fpan')
  488. };
  489.  
  490. struct gxFormatPanelInfo {
  491.     Str31                             startPanelName;                /* Name of starting panel in Format dialog */
  492. };
  493. typedef struct gxFormatPanelInfo gxFormatPanelInfo;
  494.  
  495.  
  496. /* gxTranslatedDocumentTag COLLECTION ITEM */
  497.  
  498. enum {
  499.     gxTranslatedDocumentTag        = FOUR_CHAR_CODE('trns')
  500. };
  501.  
  502. struct gxTranslatedDocumentInfo {
  503.     long                             translatorInfo;                /* Information from the translation process */
  504. };
  505. typedef struct gxTranslatedDocumentInfo gxTranslatedDocumentInfo;
  506.  
  507.  
  508. /* gxCoverPageTag COLLECTION ITEM */
  509.  
  510. enum {
  511.     gxCoverPageTag                = FOUR_CHAR_CODE('cvpg')
  512. };
  513.  
  514.  
  515. struct gxCoverPageInfo {
  516.     long                             coverPage;                    /* Use same enum values as for PrintRecord field in GXPrinterDrivers.h */
  517. };
  518. typedef struct gxCoverPageInfo gxCoverPageInfo;
  519.  
  520. /*
  521.  
  522.     >>>>>> FORMAT COLLECTION ITEMS <<<<<<
  523.  
  524. */
  525. /* gxPaperTypeLockTag COLLECTION ITEM */
  526.  
  527. enum {
  528.     gxPaperTypeLockTag            = FOUR_CHAR_CODE('ptlk')
  529. };
  530.  
  531. struct gxPaperTypeLockInfo {
  532.     Boolean                         paperTypeLocked;            /* True if format's paperType is locked */
  533.     char                             padByte;
  534. };
  535. typedef struct gxPaperTypeLockInfo gxPaperTypeLockInfo;
  536.  
  537.  
  538. /* gxOrientationTag COLLECTION ITEM */
  539.  
  540. enum {
  541.     gxOrientationTag            = FOUR_CHAR_CODE('layo')
  542. };
  543.  
  544. struct gxOrientationInfo {
  545.     char                             orientation;                /* An enumerated orientation value */
  546.     char                             padByte;
  547. };
  548. typedef struct gxOrientationInfo gxOrientationInfo;
  549.  
  550. /* orientation field constants */
  551.  
  552. enum {
  553.     gxPortraitLayout            = 0,                            /* Portrait */
  554.     gxLandscapeLayout            = 1,                            /* Landscape */
  555.     gxRotatedPortraitLayout        = 2,                            /* Portrait, rotated 180° */
  556.     gxRotatedLandscapeLayout    = 3                                /* Landscape, rotated 180°  */
  557. };
  558.  
  559.  
  560. /* gxScalingTag COLLECTION ITEM */
  561.  
  562. enum {
  563.     gxScalingTag                = FOUR_CHAR_CODE('scal')
  564. };
  565.  
  566. struct gxScalingInfo {
  567.     Fixed                             horizontalScaleFactor;        /* Current horizontal scaling factor */
  568.     Fixed                             verticalScaleFactor;        /* Current vertical scaling factor */
  569.     short                             minScaling;                    /* Minimum scaling allowed */
  570.     short                             maxScaling;                    /* Maximum scaling allowed */
  571. };
  572. typedef struct gxScalingInfo gxScalingInfo;
  573.  
  574.  
  575. /* gxDirectModeTag COLLECTION ITEM */
  576.  
  577. enum {
  578.     gxDirectModeTag                = FOUR_CHAR_CODE('dirm')
  579. };
  580.  
  581. struct gxDirectModeInfo {
  582.     Boolean                         directModeOn;                /* True if a direct mode is enabled */
  583.     char                             padByte;
  584. };
  585. typedef struct gxDirectModeInfo gxDirectModeInfo;
  586.  
  587.  
  588. /* gxFormatHalftoneTag COLLECTION ITEM */
  589.  
  590. enum {
  591.     gxFormatHalftoneTag            = FOUR_CHAR_CODE('half')
  592. };
  593.  
  594. struct gxFormatHalftoneInfo {
  595.     long                             numHalftones;                /* Number of halftone records */
  596.     gxHalftone                         halftones[1];                /* The halftone records */
  597. };
  598. typedef struct gxFormatHalftoneInfo gxFormatHalftoneInfo;
  599.  
  600.  
  601. /* gxInvertPageTag COLLECTION ITEM */
  602.  
  603. enum {
  604.     gxInvertPageTag                = FOUR_CHAR_CODE('invp')
  605. };
  606.  
  607. struct gxInvertPageInfo {
  608.     char                             padByte;
  609.     Boolean                         invert;                        /* If true, invert page */
  610. };
  611. typedef struct gxInvertPageInfo gxInvertPageInfo;
  612.  
  613.  
  614. /* gxFlipPageHorizontalTag COLLECTION ITEM */
  615.  
  616. enum {
  617.     gxFlipPageHorizontalTag        = FOUR_CHAR_CODE('flph')
  618. };
  619.  
  620. struct gxFlipPageHorizontalInfo {
  621.     char                             padByte;
  622.     Boolean                         flipHorizontal;                /* If true, flip x coordinates on page */
  623. };
  624. typedef struct gxFlipPageHorizontalInfo gxFlipPageHorizontalInfo;
  625.  
  626.  
  627. /* gxFlipPageVerticalTag COLLECTION ITEM */
  628.  
  629. enum {
  630.     gxFlipPageVerticalTag        = FOUR_CHAR_CODE('flpv')
  631. };
  632.  
  633. struct gxFlipPageVerticalInfo {
  634.     char                             padByte;
  635.     Boolean                         flipVertical;                /* If true, flip y coordinates on page */
  636. };
  637. typedef struct gxFlipPageVerticalInfo gxFlipPageVerticalInfo;
  638.  
  639.  
  640. /* gxPreciseBitmapsTag COLLECTION ITEM */
  641.  
  642. enum {
  643.     gxPreciseBitmapsTag            = FOUR_CHAR_CODE('pbmp')
  644. };
  645.  
  646. struct gxPreciseBitmapInfo {
  647.     Boolean                         preciseBitmaps;                /* If true, scale page by 96% */
  648.     char                             padByte;
  649. };
  650. typedef struct gxPreciseBitmapInfo gxPreciseBitmapInfo;
  651.  
  652.  
  653. /*
  654.  
  655.     >>>>>> PAPERTYPE COLLECTION ITEMS <<<<<<
  656.  
  657. */
  658. /* gxBaseTag COLLECTION ITEM */
  659.  
  660. enum {
  661.     gxBaseTag                    = FOUR_CHAR_CODE('base')
  662. };
  663.  
  664. struct gxBaseInfo {
  665.     long                             baseType;                    /* PaperType's base type */
  666. };
  667. typedef struct gxBaseInfo gxBaseInfo;
  668.  
  669. /* baseType field constants */
  670.  
  671. enum {
  672.     gxUnknownBase                = 0,                            /* Base paper type from which this paper type is */
  673.     gxUSLetterBase                = 1,                            /* derived.  This is not a complete set. */
  674.     gxUSLegalBase                = 2,
  675.     gxA4LetterBase                = 3,
  676.     gxB5LetterBase                = 4,
  677.     gxTabloidBase                = 5
  678. };
  679.  
  680.  
  681. /* gxCreatorTag COLLECTION ITEM */
  682.  
  683. enum {
  684.     gxCreatorTag                = FOUR_CHAR_CODE('crea')
  685. };
  686.  
  687. struct gxCreatorInfo {
  688.     OSType                             creator;                    /* PaperType's creator */
  689. };
  690. typedef struct gxCreatorInfo gxCreatorInfo;
  691.  
  692. /* gxUnitsTag COLLECTION ITEM */
  693.  
  694. enum {
  695.     gxUnitsTag                    = FOUR_CHAR_CODE('unit')
  696. };
  697.  
  698. struct gxUnitsInfo {
  699.     char                             units;                        /* PaperType's units (used by PaperType Editor). */
  700.     char                             padByte;
  701. };
  702. typedef struct gxUnitsInfo gxUnitsInfo;
  703.  
  704. /* units field constants */
  705.  
  706. enum {
  707.     gxPicas                        = 0,                            /* Pica measurement */
  708.     gxMMs                        = 1,                            /* Millimeter measurement */
  709.     gxInches                    = 2                                /* Inches measurement */
  710. };
  711.  
  712.  
  713. /* gxFlagsTag COLLECTION ITEM */
  714.  
  715. enum {
  716.     gxFlagsTag                    = FOUR_CHAR_CODE('flag')
  717. };
  718.  
  719. struct gxFlagsInfo {
  720.     long                             flags;                        /* PaperType's flags */
  721. };
  722. typedef struct gxFlagsInfo gxFlagsInfo;
  723.  
  724. /* flags field constants */
  725.  
  726. enum {
  727.     gxOldPaperTypeFlag            = 0x00800000,                    /* Indicates a paper type for compatibility printing */
  728.     gxNewPaperTypeFlag            = 0x00400000,                    /* Indicates a paper type for QuickDraw GX-aware printing */
  729.     gxOldAndNewFlag                = 0x00C00000,                    /* Indicates a paper type that's both old and new */
  730.     gxDefaultPaperTypeFlag        = 0x00100000                    /* Indicates the default paper type in the group */
  731. };
  732.  
  733.  
  734. /* gxCommentTag COLLECTION ITEM */
  735.  
  736. enum {
  737.     gxCommentTag                = FOUR_CHAR_CODE('cmnt')
  738. };
  739.  
  740. struct gxCommentInfo {
  741.     Str255                             comment;                    /* PaperType's comment */
  742. };
  743. typedef struct gxCommentInfo gxCommentInfo;
  744.  
  745.  
  746. /*
  747.  
  748.     >>>>>> PRINTER VIEWDEVICE TAGS <<<<<<
  749.  
  750. */
  751. /* gxPenTableTag COLLECTION ITEM */
  752.  
  753. enum {
  754.     gxPenTableTag                = FOUR_CHAR_CODE('pent')
  755. };
  756.  
  757. struct gxPenTableEntry {
  758.     Str31                             penName;                    /* Name of the pen */
  759.     gxColor                         penColor;                    /* Color to use from the color set */
  760.     Fixed                             penThickness;                /* Size of the pen */
  761.     short                             penUnits;                    /* Specifies units in which pen thickness is defined */
  762.     short                             penPosition;                /* Pen position in the carousel, -1 (kPenNotLoaded) if not loaded */
  763. };
  764. typedef struct gxPenTableEntry gxPenTableEntry;
  765.  
  766. struct gxPenTable {
  767.     long                             numPens;                    /* Number of pen entries in the following array */
  768.     gxPenTableEntry                 pens[1];                    /* Array of pen entries */
  769. };
  770. typedef struct gxPenTable gxPenTable;
  771.  
  772. typedef gxPenTable *                    gxPenTablePtr;
  773. typedef gxPenTablePtr *                    gxPenTableHdl;
  774. /* penUnits field constants */
  775.  
  776. enum {
  777.     gxDeviceUnits                = 0,
  778.     gxMMUnits                    = 1,
  779.     gxInchesUnits                = 2
  780. };
  781.  
  782. /* penPosition field constants */
  783.  
  784. enum {
  785.     gxPenNotLoaded                = -1
  786. };
  787.  
  788.  
  789. /*
  790.  
  791.     >>>>>> DIALOG-RELATED CONSTANTS AND TYPES <<<<<<
  792.  
  793. */
  794. typedef long                             gxDialogResult;
  795.  
  796. enum {
  797.     gxCancelSelected            = 0L,
  798.     gxOKSelected                = 1L,
  799.     gxRevertSelected            = 2L
  800. };
  801.  
  802.  
  803. struct gxEditMenuRecord {
  804.     short                             editMenuID;
  805.     short                             cutItem;
  806.     short                             copyItem;
  807.     short                             pasteItem;
  808.     short                             clearItem;
  809.     short                             undoItem;
  810. };
  811. typedef struct gxEditMenuRecord gxEditMenuRecord;
  812.  
  813.  
  814. /*
  815.  
  816.     >>>>>> JOB FORMAT MODE CONSTANTS AND TYPES <<<<<<
  817.  
  818. */
  819. typedef OSType                             gxJobFormatMode;
  820. struct gxJobFormatModeTable {
  821.     long                             numModes;                    /* Number of job format modes to choose from */
  822.     gxJobFormatMode                 modes[1];                    /* The job format modes */
  823. };
  824. typedef struct gxJobFormatModeTable gxJobFormatModeTable;
  825.  
  826. typedef gxJobFormatModeTable *            gxJobFormatModeTablePtr;
  827. typedef gxJobFormatModeTablePtr *        gxJobFormatModeTableHdl;
  828.  
  829. enum {
  830.     gxGraphicsJobFormatMode        = FOUR_CHAR_CODE('grph'),
  831.     gxTextJobFormatMode            = FOUR_CHAR_CODE('text'),
  832.     gxPostScriptJobFormatMode    = FOUR_CHAR_CODE('post')
  833. };
  834.  
  835. typedef long                             gxQueryType;
  836.  
  837. enum {
  838.     gxGetJobFormatLineConstraintQuery = 0L,
  839.     gxGetJobFormatFontsQuery    = 1L,
  840.     gxGetJobFormatFontCommonStylesQuery = 2L,
  841.     gxGetJobFormatFontConstraintQuery = 3L,
  842.     gxSetStyleJobFormatCommonStyleQuery = 4L
  843. };
  844.  
  845.  
  846. /* Structures used for Text mode field constants */
  847. struct gxPositionConstraintTable {
  848.     gxPoint                         phase;                        /* Position phase */
  849.     gxPoint                         offset;                        /* Position offset */
  850.     long                             numSizes;                    /* Number of available font sizes */
  851.     Fixed                             sizes[1];                    /* The available font sizes */
  852. };
  853. typedef struct gxPositionConstraintTable gxPositionConstraintTable;
  854.  
  855. typedef gxPositionConstraintTable *        gxPositionConstraintTablePtr;
  856. typedef gxPositionConstraintTablePtr *    gxPositionConstraintTableHdl;
  857. /* numSizes field constants */
  858.  
  859. enum {
  860.     gxConstraintRange            = -1
  861. };
  862.  
  863. struct gxStyleNameTable {
  864.     long                             numStyleNames;                /* Number of style names */
  865.     Str255                             styleNames[1];                /* The style names */
  866. };
  867. typedef struct gxStyleNameTable gxStyleNameTable;
  868.  
  869. typedef gxStyleNameTable *                gxStyleNameTablePtr;
  870. typedef gxStyleNameTablePtr *            gxStyleNameTableHdl;
  871. struct gxFontTable {
  872.     long                             numFonts;                    /* Number of font references */
  873.     gxFont                             fonts[1];                    /* The font references */
  874. };
  875. typedef struct gxFontTable gxFontTable;
  876.  
  877. typedef gxFontTable *                    gxFontTablePtr;
  878. typedef gxFontTablePtr *                gxFontTableHdl;
  879. /* ------------------------------------------------------------------------------
  880.  
  881.                                 Printing Manager API Functions
  882.  
  883. -------------------------------------------------------------------------------- */
  884. /*
  885.     Global Routines
  886. */
  887. EXTERN_API( OSErr )
  888. GXInitPrinting                    (void)                                                        FOURWORDINLINE(0x203C, 0x0000, 0x0000, 0xABFE);
  889.  
  890. EXTERN_API( OSErr )
  891. GXExitPrinting                    (void)                                                        FOURWORDINLINE(0x203C, 0x0000, 0x0001, 0xABFE);
  892.  
  893.  
  894. /*
  895.     Error-Handling Routines
  896. */
  897. EXTERN_API( OSErr )
  898. GXGetJobError                    (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x000E, 0xABFE);
  899.  
  900. EXTERN_API( void )
  901. GXSetJobError                    (gxJob                     aJob,
  902.                                  OSErr                     anErr)                                FOURWORDINLINE(0x203C, 0x0000, 0x000F, 0xABFE);
  903.  
  904.  
  905. /*
  906.     Job Routines
  907. */
  908. EXTERN_API( OSErr )
  909. GXNewJob                        (gxJob *                aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0002, 0xABFE);
  910.  
  911. EXTERN_API( OSErr )
  912. GXDisposeJob                    (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0003, 0xABFE);
  913.  
  914. EXTERN_API( void )
  915. GXFlattenJob                    (gxJob                     aJob,
  916.                                  GXPrintingFlattenUPP     flattenProc,
  917.                                  void *                    aVoid)                                FOURWORDINLINE(0x203C, 0x0000, 0x0004, 0xABFE);
  918.  
  919. EXTERN_API( gxJob )
  920. GXUnflattenJob                    (gxJob                     aJob,
  921.                                  GXPrintingFlattenUPP     flattenProc,
  922.                                  void *                    aVoid)                                FOURWORDINLINE(0x203C, 0x0000, 0x0005, 0xABFE);
  923.  
  924. EXTERN_API( Handle )
  925. GXFlattenJobToHdl                (gxJob                     aJob,
  926.                                  Handle                 aHdl)                                FOURWORDINLINE(0x203C, 0x0000, 0x0006, 0xABFE);
  927.  
  928. EXTERN_API( gxJob )
  929. GXUnflattenJobFromHdl            (gxJob                     aJob,
  930.                                  Handle                 aHdl)                                FOURWORDINLINE(0x203C, 0x0000, 0x0007, 0xABFE);
  931.  
  932. EXTERN_API( void )
  933. GXInstallApplicationOverride    (gxJob                     aJob,
  934.                                  short                     messageID,
  935.                                  void *                    override)                            FOURWORDINLINE(0x203C, 0x0000, 0x0008, 0xABFE);
  936.  
  937. EXTERN_API( Collection )
  938. GXGetJobCollection                (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x001D, 0xABFE);
  939.  
  940. EXTERN_API( void *)
  941. GXGetJobRefCon                    (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x001E, 0xABFE);
  942.  
  943. EXTERN_API( void )
  944. GXSetJobRefCon                    (gxJob                     aJob,
  945.                                  void *                    refCon)                                FOURWORDINLINE(0x203C, 0x0000, 0x001F, 0xABFE);
  946.  
  947. EXTERN_API( gxJob )
  948. GXCopyJob                        (gxJob                     srcJob,
  949.                                  gxJob                     dstJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0020, 0xABFE);
  950.  
  951. EXTERN_API( void )
  952. GXSelectJobFormattingPrinter    (gxJob                     aJob,
  953.                                  Str31                     printerName)                        FOURWORDINLINE(0x203C, 0x0000, 0x0021, 0xABFE);
  954.  
  955. EXTERN_API( void )
  956. GXSelectJobOutputPrinter        (gxJob                     aJob,
  957.                                  Str31                     printerName)                        FOURWORDINLINE(0x203C, 0x0000, 0x0022, 0xABFE);
  958.  
  959. EXTERN_API( void )
  960. GXForEachJobFormatDo            (gxJob                     aJob,
  961.                                  GXFormatUPP             formatProc,
  962.                                  void *                    refCon)                                FOURWORDINLINE(0x203C, 0x0000, 0x0023, 0xABFE);
  963.  
  964. EXTERN_API( long )
  965. GXCountJobFormats                (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0024, 0xABFE);
  966.  
  967. EXTERN_API( Boolean )
  968. GXUpdateJob                        (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0025, 0xABFE);
  969.  
  970. EXTERN_API( void )
  971. GXConvertPrintRecord            (gxJob                     aJob,
  972.                                  THPrint                 hPrint)                                FOURWORDINLINE(0x203C, 0x0000, 0x0026, 0xABFE);
  973.  
  974. EXTERN_API( void )
  975. GXIdleJob                        (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0057, 0xABFE);
  976.  
  977.  
  978. /*
  979.     Job Format Modes Routines
  980. */
  981. EXTERN_API( void )
  982. GXSetAvailableJobFormatModes    (gxJob                     aJob,
  983.                                  gxJobFormatModeTableHdl  formatModeTable)                    FOURWORDINLINE(0x203C, 0x0000, 0x003B, 0xABFE);
  984.  
  985. EXTERN_API( gxJobFormatMode )
  986. GXGetPreferredJobFormatMode        (gxJob                     aJob,
  987.                                  Boolean *                directOnly)                            FOURWORDINLINE(0x203C, 0x0000, 0x003C, 0xABFE);
  988.  
  989. EXTERN_API( gxJobFormatMode )
  990. GXGetJobFormatMode                (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x003D, 0xABFE);
  991.  
  992. EXTERN_API( void )
  993. GXSetJobFormatMode                (gxJob                     aJob,
  994.                                  gxJobFormatMode         formatMode)                            FOURWORDINLINE(0x203C, 0x0000, 0x003E, 0xABFE);
  995.  
  996. EXTERN_API( void )
  997. GXJobFormatModeQuery            (gxJob                     aJob,
  998.                                  gxQueryType             aQueryType,
  999.                                  void *                    srcData,
  1000.                                  void *                    dstData)                            FOURWORDINLINE(0x203C, 0x0000, 0x003F, 0xABFE);
  1001.  
  1002.  
  1003. /*
  1004.     Format Routines
  1005. */
  1006. EXTERN_API( gxFormat )
  1007. GXNewFormat                        (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0009, 0xABFE);
  1008.  
  1009. EXTERN_API( void )
  1010. GXDisposeFormat                    (gxFormat                 aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x000A, 0xABFE);
  1011.  
  1012. EXTERN_API( gxFormat )
  1013. GXGetJobFormat                    (gxJob                     aJob,
  1014.                                  long                     whichFormat)                        FOURWORDINLINE(0x203C, 0x0000, 0x0013, 0xABFE);
  1015.  
  1016. EXTERN_API( gxJob )
  1017. GXGetFormatJob                    (gxFormat                 aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0014, 0xABFE);
  1018.  
  1019. EXTERN_API( gxPaperType )
  1020. GXGetFormatPaperType            (gxFormat                 aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0015, 0xABFE);
  1021.  
  1022. EXTERN_API( void )
  1023. GXGetFormatDimensions            (gxFormat                 aFormat,
  1024.                                  gxRectangle *            pageSize,
  1025.                                  gxRectangle *            paperSize)                            FOURWORDINLINE(0x203C, 0x0000, 0x0016, 0xABFE);
  1026.  
  1027. EXTERN_API( Collection )
  1028. GXGetFormatCollection            (gxFormat                 aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0033, 0xABFE);
  1029.  
  1030. EXTERN_API( void )
  1031. GXChangedFormat                    (gxFormat                 aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0034, 0xABFE);
  1032.  
  1033. EXTERN_API( gxFormat )
  1034. GXCopyFormat                    (gxFormat                 srcFormat,
  1035.                                  gxFormat                 dstFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0035, 0xABFE);
  1036.  
  1037. EXTERN_API( gxFormat )
  1038. GXCloneFormat                    (gxFormat                 aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0036, 0xABFE);
  1039.  
  1040. EXTERN_API( long )
  1041. GXCountFormatOwners                (gxFormat                 aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0037, 0xABFE);
  1042.  
  1043. EXTERN_API( void )
  1044. GXGetFormatMapping                (gxFormat                 aFormat,
  1045.                                  gxMapping *            fmtMapping)                            FOURWORDINLINE(0x203C, 0x0000, 0x0038, 0xABFE);
  1046.  
  1047. EXTERN_API( gxShape )
  1048. GXGetFormatForm                    (gxFormat                 aFormat,
  1049.                                  gxShape *                mask)                                FOURWORDINLINE(0x203C, 0x0000, 0x0039, 0xABFE);
  1050.  
  1051. EXTERN_API( void )
  1052. GXSetFormatForm                    (gxFormat                 aFormat,
  1053.                                  gxShape                 form,
  1054.                                  gxShape                 mask)                                FOURWORDINLINE(0x203C, 0x0000, 0x003A, 0xABFE);
  1055.  
  1056.  
  1057. /*
  1058.     PaperType Routines
  1059. */
  1060. EXTERN_API( gxPaperType )
  1061. GXNewPaperType                    (gxJob                     aJob,
  1062.                                  Str31                     name,
  1063.                                  gxRectangle *            pageSize,
  1064.                                  gxRectangle *            paperSize)                            FOURWORDINLINE(0x203C, 0x0000, 0x000B, 0xABFE);
  1065.  
  1066. EXTERN_API( void )
  1067. GXDisposePaperType                (gxPaperType             aPaperType)                            FOURWORDINLINE(0x203C, 0x0000, 0x000C, 0xABFE);
  1068.  
  1069. EXTERN_API( gxPaperType )
  1070. GXGetNewPaperType                (gxJob                     aJob,
  1071.                                  short                     resID)                                FOURWORDINLINE(0x203C, 0x0000, 0x000D, 0xABFE);
  1072.  
  1073. EXTERN_API( long )
  1074. GXCountJobPaperTypes            (gxJob                     aJob,
  1075.                                  Boolean                 forFormatDevice)                    FOURWORDINLINE(0x203C, 0x0000, 0x0042, 0xABFE);
  1076.  
  1077. EXTERN_API( gxPaperType )
  1078. GXGetJobPaperType                (gxJob                     aJob,
  1079.                                  long                     whichPaperType,
  1080.                                  Boolean                 forFormatDevice,
  1081.                                  gxPaperType             aPaperType)                            FOURWORDINLINE(0x203C, 0x0000, 0x0043, 0xABFE);
  1082.  
  1083. EXTERN_API( void )
  1084. GXForEachJobPaperTypeDo            (gxJob                     aJob,
  1085.                                  GXPaperTypeUPP         aProc,
  1086.                                  void *                    refCon,
  1087.                                  Boolean                 forFormattingPrinter)                FOURWORDINLINE(0x203C, 0x0000, 0x0044, 0xABFE);
  1088.  
  1089. EXTERN_API( gxPaperType )
  1090. GXCopyPaperType                    (gxPaperType             srcPaperType,
  1091.                                  gxPaperType             dstPaperType)                        FOURWORDINLINE(0x203C, 0x0000, 0x0045, 0xABFE);
  1092.  
  1093. EXTERN_API( void )
  1094. GXGetPaperTypeName                (gxPaperType             aPaperType,
  1095.                                  Str31                     papertypeName)                        FOURWORDINLINE(0x203C, 0x0000, 0x0046, 0xABFE);
  1096.  
  1097. EXTERN_API( void )
  1098. GXGetPaperTypeDimensions        (gxPaperType             aPaperType,
  1099.                                  gxRectangle *            pageSize,
  1100.                                  gxRectangle *            paperSize)                            FOURWORDINLINE(0x203C, 0x0000, 0x0047, 0xABFE);
  1101.  
  1102. EXTERN_API( gxJob )
  1103. GXGetPaperTypeJob                (gxPaperType             aPaperType)                            FOURWORDINLINE(0x203C, 0x0000, 0x0048, 0xABFE);
  1104.  
  1105. EXTERN_API( Collection )
  1106. GXGetPaperTypeCollection        (gxPaperType             aPaperType)                            FOURWORDINLINE(0x203C, 0x0000, 0x0049, 0xABFE);
  1107.  
  1108.  
  1109. /*
  1110.     Printer Routines
  1111. */
  1112. EXTERN_API( gxPrinter )
  1113. GXGetJobFormattingPrinter        (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0027, 0xABFE);
  1114.  
  1115. EXTERN_API( gxPrinter )
  1116. GXGetJobOutputPrinter            (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0028, 0xABFE);
  1117.  
  1118. EXTERN_API( gxPrinter )
  1119. GXGetJobPrinter                    (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0029, 0xABFE);
  1120.  
  1121. EXTERN_API( gxJob )
  1122. GXGetPrinterJob                    (gxPrinter                 aPrinter)                            FOURWORDINLINE(0x203C, 0x0000, 0x002A, 0xABFE);
  1123.  
  1124. EXTERN_API( void )
  1125. GXForEachPrinterViewDeviceDo    (gxPrinter                 aPrinter,
  1126.                                  GXViewDeviceUPP         aProc,
  1127.                                  void *                    refCon)                                FOURWORDINLINE(0x203C, 0x0000, 0x002B, 0xABFE);
  1128.  
  1129. EXTERN_API( long )
  1130. GXCountPrinterViewDevices        (gxPrinter                 aPrinter)                            FOURWORDINLINE(0x203C, 0x0000, 0x002C, 0xABFE);
  1131.  
  1132. EXTERN_API( gxViewDevice )
  1133. GXGetPrinterViewDevice            (gxPrinter                 aPrinter,
  1134.                                  long                     whichViewDevice)                    FOURWORDINLINE(0x203C, 0x0000, 0x002D, 0xABFE);
  1135.  
  1136. EXTERN_API( void )
  1137. GXSelectPrinterViewDevice        (gxPrinter                 aPrinter,
  1138.                                  long                     whichViewDevice)                    FOURWORDINLINE(0x203C, 0x0000, 0x002E, 0xABFE);
  1139.  
  1140. EXTERN_API( void )
  1141. GXGetPrinterName                (gxPrinter                 aPrinter,
  1142.                                  Str31                     printerName)                        FOURWORDINLINE(0x203C, 0x0000, 0x002F, 0xABFE);
  1143.  
  1144. EXTERN_API( OSType )
  1145. GXGetPrinterType                (gxPrinter                 aPrinter)                            FOURWORDINLINE(0x203C, 0x0000, 0x0030, 0xABFE);
  1146.  
  1147. EXTERN_API( void )
  1148. GXGetPrinterDriverName            (gxPrinter                 aPrinter,
  1149.                                  Str31                     driverName)                            FOURWORDINLINE(0x203C, 0x0000, 0x0031, 0xABFE);
  1150.  
  1151. EXTERN_API( OSType )
  1152. GXGetPrinterDriverType            (gxPrinter                 aPrinter)                            FOURWORDINLINE(0x203C, 0x0000, 0x0032, 0xABFE);
  1153.  
  1154.  
  1155. /*
  1156.     Dialog Routines
  1157. */
  1158. EXTERN_API( gxDialogResult )
  1159. GXJobDefaultFormatDialog        (gxJob                     aJob,
  1160.                                  gxEditMenuRecord *        anEditMenuRec)                        FOURWORDINLINE(0x203C, 0x0000, 0x0010, 0xABFE);
  1161.  
  1162. EXTERN_API( gxDialogResult )
  1163. GXJobPrintDialog                (gxJob                     aJob,
  1164.                                  gxEditMenuRecord *        anEditMenuRec)                        FOURWORDINLINE(0x203C, 0x0000, 0x0011, 0xABFE);
  1165.  
  1166. EXTERN_API( gxDialogResult )
  1167. GXFormatDialog                    (gxFormat                 aFormat,
  1168.                                  gxEditMenuRecord *        anEditMenuRec,
  1169.                                  StringPtr                 title)                                FOURWORDINLINE(0x203C, 0x0000, 0x0012, 0xABFE);
  1170.  
  1171. EXTERN_API( void )
  1172. GXEnableJobScalingPanel            (gxJob                     aJob,
  1173.                                  Boolean                 enabled)                            FOURWORDINLINE(0x203C, 0x0000, 0x0040, 0xABFE);
  1174.  
  1175. EXTERN_API( void )
  1176. GXGetJobPanelDimensions            (gxJob                     aJob,
  1177.                                  Rect *                    panelArea)                            FOURWORDINLINE(0x203C, 0x0000, 0x0041, 0xABFE);
  1178.  
  1179.  
  1180. /*
  1181.     Spooling Routines
  1182. */
  1183. EXTERN_API( void )
  1184. GXGetJobPageRange                (gxJob                     theJob,
  1185.                                  long *                    firstPage,
  1186.                                  long *                    lastPage)                            FOURWORDINLINE(0x203C, 0x0000, 0x0017, 0xABFE);
  1187.  
  1188. EXTERN_API( void )
  1189. GXStartJob                        (gxJob                     theJob,
  1190.                                  StringPtr                 docName,
  1191.                                  long                     pageCount)                            FOURWORDINLINE(0x203C, 0x0000, 0x0018, 0xABFE);
  1192.  
  1193. EXTERN_API( void )
  1194. GXPrintPage                        (gxJob                     theJob,
  1195.                                  long                     pageNumber,
  1196.                                  gxFormat                 theFormat,
  1197.                                  gxShape                 thePage)                            FOURWORDINLINE(0x203C, 0x0000, 0x0019, 0xABFE);
  1198.  
  1199. EXTERN_API( Boolean )
  1200. GXStartPage                        (gxJob                     theJob,
  1201.                                  long                     pageNumber,
  1202.                                  gxFormat                 theFormat,
  1203.                                  long                     numViewPorts,
  1204.                                  gxViewPort *            viewPortList)                        FOURWORDINLINE(0x203C, 0x0000, 0x001A, 0xABFE);
  1205.  
  1206. EXTERN_API( void )
  1207. GXFinishPage                    (gxJob                     theJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x001B, 0xABFE);
  1208.  
  1209. EXTERN_API( void )
  1210. GXFinishJob                        (gxJob                     theJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x001C, 0xABFE);
  1211.  
  1212.  
  1213. /*
  1214.     PrintFile Routines
  1215. */
  1216. EXTERN_API( gxPrintFile )
  1217. GXOpenPrintFile                    (gxJob                     theJob,
  1218.                                  FSSpecPtr                 anFSSpec,
  1219.                                  char                     permission)                            FOURWORDINLINE(0x203C, 0x0000, 0x004A, 0xABFE);
  1220.  
  1221. EXTERN_API( void )
  1222. GXClosePrintFile                (gxPrintFile             aPrintFile)                            FOURWORDINLINE(0x203C, 0x0000, 0x004B, 0xABFE);
  1223.  
  1224. EXTERN_API( gxJob )
  1225. GXGetPrintFileJob                (gxPrintFile             aPrintFile)                            FOURWORDINLINE(0x203C, 0x0000, 0x004C, 0xABFE);
  1226.  
  1227. EXTERN_API( long )
  1228. GXCountPrintFilePages            (gxPrintFile             aPrintFile)                            FOURWORDINLINE(0x203C, 0x0000, 0x004D, 0xABFE);
  1229.  
  1230. EXTERN_API( void )
  1231. GXReadPrintFilePage                (gxPrintFile             aPrintFile,
  1232.                                  long                     pageNumber,
  1233.                                  long                     numViewPorts,
  1234.                                  gxViewPort *            viewPortList,
  1235.                                  gxFormat *                pgFormat,
  1236.                                  gxShape *                pgShape)                            FOURWORDINLINE(0x203C, 0x0000, 0x004E, 0xABFE);
  1237.  
  1238. EXTERN_API( void )
  1239. GXReplacePrintFilePage            (gxPrintFile             aPrintFile,
  1240.                                  long                     pageNumber,
  1241.                                  gxFormat                 aFormat,
  1242.                                  gxShape                 aShape)                                FOURWORDINLINE(0x203C, 0x0000, 0x004F, 0xABFE);
  1243.  
  1244. EXTERN_API( void )
  1245. GXInsertPrintFilePage            (gxPrintFile             aPrintFile,
  1246.                                  long                     atPageNumber,
  1247.                                  gxFormat                 pgFormat,
  1248.                                  gxShape                 pgShape)                            FOURWORDINLINE(0x203C, 0x0000, 0x0050, 0xABFE);
  1249.  
  1250. EXTERN_API( void )
  1251. GXDeletePrintFilePageRange        (gxPrintFile             aPrintFile,
  1252.                                  long                     fromPageNumber,
  1253.                                  long                     toPageNumber)                        FOURWORDINLINE(0x203C, 0x0000, 0x0051, 0xABFE);
  1254.  
  1255. EXTERN_API( void )
  1256. GXSavePrintFile                    (gxPrintFile             aPrintFile,
  1257.                                  FSSpec *                anFSSpec)                            FOURWORDINLINE(0x203C, 0x0000, 0x0052, 0xABFE);
  1258.  
  1259.  
  1260. /*
  1261.     ColorSync Routines
  1262. */
  1263. EXTERN_API( long )
  1264. GXFindPrinterProfile            (gxPrinter                 aPrinter,
  1265.                                  void *                    searchData,
  1266.                                  long                     index,
  1267.                                  gxColorProfile *        returnedProfile)                    FOURWORDINLINE(0x203C, 0x0000, 0x0053, 0xABFE);
  1268.  
  1269. EXTERN_API( long )
  1270. GXFindFormatProfile                (gxFormat                 aFormat,
  1271.                                  void *                    searchData,
  1272.                                  long                     index,
  1273.                                  gxColorProfile *        returnedProfile)                    FOURWORDINLINE(0x203C, 0x0000, 0x0054, 0xABFE);
  1274.  
  1275. EXTERN_API( void )
  1276. GXSetPrinterProfile                (gxPrinter                 aPrinter,
  1277.                                  gxColorProfile         oldProfile,
  1278.                                  gxColorProfile         newProfile)                            FOURWORDINLINE(0x203C, 0x0000, 0x0055, 0xABFE);
  1279.  
  1280. EXTERN_API( void )
  1281. GXSetFormatProfile                (gxFormat                 aFormat,
  1282.                                  gxColorProfile         oldProfile,
  1283.                                  gxColorProfile         newProfile)                            FOURWORDINLINE(0x203C, 0x0000, 0x0056, 0xABFE);
  1284.  
  1285.  
  1286. /************************************************************************
  1287.                         Start of old "GXPrintingResEquates.h/a/p" interface file.
  1288.                 *************************************************************************/
  1289. /*    ------------------------------------
  1290.                 Basic client types
  1291.     ------------------------------------ */
  1292.  
  1293. enum {
  1294.     gxPrintingManagerType        = FOUR_CHAR_CODE('pmgr'),
  1295.     gxImagingSystemType            = FOUR_CHAR_CODE('gxis'),
  1296.     gxPrinterDriverType            = FOUR_CHAR_CODE('pdvr'),
  1297.     gxPrintingExtensionType        = FOUR_CHAR_CODE('pext'),
  1298.     gxUnknownPrinterType        = FOUR_CHAR_CODE('none'),
  1299.     gxAnyPrinterType            = FOUR_CHAR_CODE('univ'),
  1300.     gxQuickdrawPrinterType        = FOUR_CHAR_CODE('qdrw'),
  1301.     gxPortableDocPrinterType    = FOUR_CHAR_CODE('gxpd'),
  1302.     gxRasterPrinterType            = FOUR_CHAR_CODE('rast'),
  1303.     gxPostscriptPrinterType        = FOUR_CHAR_CODE('post'),
  1304.     gxVectorPrinterType            = FOUR_CHAR_CODE('vect')
  1305. };
  1306.  
  1307. /* All pre-defined printing collection items have this ID */
  1308.  
  1309. enum {
  1310.     gxPrintingTagID                = -28672
  1311. };
  1312.  
  1313.  
  1314. /*    ----------------------------------------------------------------------
  1315.  
  1316.         Resource types and IDs used by both extension and driver writers
  1317.  
  1318.     ---------------------------------------------------------------------- */
  1319. /* Resources in a printer driver or extension must be based off of these IDs */
  1320.  
  1321. enum {
  1322.     gxPrintingDriverBaseID        = -27648,
  1323.     gxPrintingExtensionBaseID    = -27136
  1324. };
  1325.  
  1326. /*    Override resources tell the system what messages a driver or extension
  1327.         is overriding.  A driver may have a series of these resources. */
  1328. /* Override resource type for 68k resource-based code:*/
  1329.  
  1330.  
  1331. enum {
  1332.     gxOverrideType                = FOUR_CHAR_CODE('over')
  1333. };
  1334.  
  1335.  
  1336. /* Override resource type for PowerPC datafork-based code:*/
  1337.  
  1338.  
  1339. enum {
  1340.     gxNativeOverrideType        = FOUR_CHAR_CODE('povr')
  1341. };
  1342.  
  1343.  
  1344. /*    --------------------------------------------------------------
  1345.  
  1346.         Message ID definitions by both extension and driver writers
  1347.  
  1348.     --------------------------------------------------------------- */
  1349. /* Identifiers for universal message overrides. */
  1350.  
  1351. enum {
  1352.     gxInitializeMsg                = 0,
  1353.     gxShutDownMsg                = 1,
  1354.     gxJobIdleMsg                = 2,
  1355.     gxJobStatusMsg                = 3,
  1356.     gxPrintingEventMsg            = 4,
  1357.     gxJobDefaultFormatDialogMsg    = 5,
  1358.     gxFormatDialogMsg            = 6,
  1359.     gxJobPrintDialogMsg            = 7,
  1360.     gxFilterPanelEventMsg        = 8,
  1361.     gxHandlePanelEventMsg        = 9,
  1362.     gxParsePageRangeMsg            = 10,
  1363.     gxDefaultJobMsg                = 11,
  1364.     gxDefaultFormatMsg            = 12,
  1365.     gxDefaultPaperTypeMsg        = 13,
  1366.     gxDefaultPrinterMsg            = 14,
  1367.     gxCreateSpoolFileMsg        = 15,
  1368.     gxSpoolPageMsg                = 16,
  1369.     gxSpoolDataMsg                = 17,
  1370.     gxSpoolResourceMsg            = 18,
  1371.     gxCompleteSpoolFileMsg        = 19,
  1372.     gxCountPagesMsg                = 20,
  1373.     gxDespoolPageMsg            = 21,
  1374.     gxDespoolDataMsg            = 22,
  1375.     gxDespoolResourceMsg        = 23,
  1376.     gxCloseSpoolFileMsg            = 24,
  1377.     gxStartJobMsg                = 25,
  1378.     gxFinishJobMsg                = 26,
  1379.     gxStartPageMsg                = 27,
  1380.     gxFinishPageMsg                = 28,
  1381.     gxPrintPageMsg                = 29,
  1382.     gxSetupImageDataMsg            = 30,
  1383.     gxImageJobMsg                = 31,
  1384.     gxImageDocumentMsg            = 32,
  1385.     gxImagePageMsg                = 33,
  1386.     gxRenderPageMsg                = 34,
  1387.     gxCreateImageFileMsg        = 35,
  1388.     gxOpenConnectionMsg            = 36,
  1389.     gxCloseConnectionMsg        = 37,
  1390.     gxStartSendPageMsg            = 38,
  1391.     gxFinishSendPageMsg            = 39,
  1392.     gxWriteDataMsg                = 40,
  1393.     gxBufferDataMsg                = 41,
  1394.     gxDumpBufferMsg                = 42,
  1395.     gxFreeBufferMsg                = 43,
  1396.     gxCheckStatusMsg            = 44,
  1397.     gxGetDeviceStatusMsg        = 45,
  1398.     gxFetchTaggedDataMsg        = 46,
  1399.     gxGetDTPMenuListMsg            = 47,
  1400.     gxDTPMenuSelectMsg            = 48,
  1401.     gxHandleAlertFilterMsg        = 49,
  1402.     gxJobFormatModeQueryMsg        = 50,
  1403.     gxWriteStatusToDTPWindowMsg    = 51,
  1404.     gxInitializeStatusAlertMsg    = 52,
  1405.     gxHandleAlertStatusMsg        = 53,
  1406.     gxHandleAlertEventMsg        = 54,
  1407.     gxCleanupStartJobMsg        = 55,
  1408.     gxCleanupStartPageMsg        = 56,
  1409.     gxCleanupOpenConnectionMsg    = 57,
  1410.     gxCleanupStartSendPageMsg    = 58,
  1411.     gxDefaultDesktopPrinterMsg    = 59,
  1412.     gxCaptureOutputDeviceMsg    = 60,
  1413.     gxOpenConnectionRetryMsg    = 61,
  1414.     gxExamineSpoolFileMsg        = 62,
  1415.     gxFinishSendPlaneMsg        = 63,
  1416.     gxDoesPaperFitMsg            = 64,
  1417.     gxChooserMessageMsg            = 65,
  1418.     gxFindPrinterProfileMsg        = 66,
  1419.     gxFindFormatProfileMsg        = 67,
  1420.     gxSetPrinterProfileMsg        = 68,
  1421.     gxSetFormatProfileMsg        = 69,
  1422.     gxHandleAltDestinationMsg    = 70,
  1423.     gxSetupPageImageDataMsg        = 71
  1424. };
  1425.  
  1426.  
  1427. /* Identifiers for Quickdraw message overrides. */
  1428.  
  1429. enum {
  1430.     gxPrOpenDocMsg                = 0,
  1431.     gxPrCloseDocMsg                = 1,
  1432.     gxPrOpenPageMsg                = 2,
  1433.     gxPrClosePageMsg            = 3,
  1434.     gxPrintDefaultMsg            = 4,
  1435.     gxPrStlDialogMsg            = 5,
  1436.     gxPrJobDialogMsg            = 6,
  1437.     gxPrStlInitMsg                = 7,
  1438.     gxPrJobInitMsg                = 8,
  1439.     gxPrDlgMainMsg                = 9,
  1440.     gxPrValidateMsg                = 10,
  1441.     gxPrJobMergeMsg                = 11,
  1442.     gxPrGeneralMsg                = 12,
  1443.     gxConvertPrintRecordToMsg    = 13,
  1444.     gxConvertPrintRecordFromMsg    = 14,
  1445.     gxPrintRecordToJobMsg        = 15
  1446. };
  1447.  
  1448.  
  1449. /* Identifiers for raster imaging message overrides. */
  1450.  
  1451. enum {
  1452.     gxRasterDataInMsg            = 0,
  1453.     gxRasterLineFeedMsg            = 1,
  1454.     gxRasterPackageBitmapMsg    = 2
  1455. };
  1456.  
  1457.  
  1458. /* Identifiers for PostScript imaging message overrides. */
  1459.  
  1460. enum {
  1461.     gxPostscriptQueryPrinterMsg    = 0,
  1462.     gxPostscriptInitializePrinterMsg = 1,
  1463.     gxPostscriptResetPrinterMsg    = 2,
  1464.     gxPostscriptExitServerMsg    = 3,
  1465.     gxPostscriptGetStatusTextMsg = 4,
  1466.     gxPostscriptGetPrinterTextMsg = 5,
  1467.     gxPostscriptScanStatusTextMsg = 6,
  1468.     gxPostscriptScanPrinterTextMsg = 7,
  1469.     gxPostscriptGetDocumentProcSetListMsg = 8,
  1470.     gxPostscriptDownloadProcSetListMsg = 9,
  1471.     gxPostscriptGetPrinterGlyphsInformationMsg = 10,
  1472.     gxPostscriptStreamFontMsg    = 11,
  1473.     gxPostscriptDoDocumentHeaderMsg = 12,
  1474.     gxPostscriptDoDocumentSetUpMsg = 13,
  1475.     gxPostscriptDoDocumentTrailerMsg = 14,
  1476.     gxPostscriptDoPageSetUpMsg    = 15,
  1477.     gxPostscriptSelectPaperTypeMsg = 16,
  1478.     gxPostscriptDoPageTrailerMsg = 17,
  1479.     gxPostscriptEjectPageMsg    = 18,
  1480.     gxPostscriptProcessShapeMsg    = 19,
  1481.     gxPostScriptEjectPendingPageMsg = 20
  1482. };
  1483.  
  1484.  
  1485. /* Identifiers for Vector imaging message overrides. */
  1486.  
  1487. enum {
  1488.     gxVectorPackageDataMsg        = 0,
  1489.     gxVectorLoadPensMsg            = 1,
  1490.     gxVectorVectorizeShapeMsg    = 2
  1491. };
  1492.  
  1493.  
  1494. /* Dialog related resource types */
  1495.  
  1496. enum {
  1497.     gxPrintingAlertType            = FOUR_CHAR_CODE('plrt'),
  1498.     gxStatusType                = FOUR_CHAR_CODE('stat'),
  1499.     gxExtendedDITLType            = FOUR_CHAR_CODE('xdtl'),
  1500.     gxPrintPanelType            = FOUR_CHAR_CODE('ppnl'),
  1501.     gxCollectionType            = FOUR_CHAR_CODE('cltn')
  1502. };
  1503.  
  1504.  
  1505. /* Communication resource types */
  1506. /*
  1507.     The looker resource is used by the Chooser PACK to determine what kind
  1508.     of communications this driver supports. (In order to generate/handle the 
  1509.     pop-up menu for "Connect via:".
  1510.     
  1511.     The looker resource is also used by PrinterShare to determine the AppleTalk NBP Type
  1512.     for servers created for this driver.
  1513. */
  1514.  
  1515. enum {
  1516.     gxLookerType                = FOUR_CHAR_CODE('look'),
  1517.     gxLookerID                    = -4096
  1518. };
  1519.  
  1520.  
  1521. /* The communications method and private data used to connect to the printer */
  1522.  
  1523. enum {
  1524.     gxDeviceCommunicationsType    = FOUR_CHAR_CODE('comm')
  1525. };
  1526.  
  1527. /*    -------------------------------------------------
  1528.  
  1529.     Resource types and IDs used by extension writers
  1530.  
  1531.     ------------------------------------------------- */
  1532.  
  1533. enum {
  1534.     gxExtensionUniversalOverrideID = gxPrintingExtensionBaseID
  1535. };
  1536.  
  1537.  
  1538. enum {
  1539.     gxExtensionImagingOverrideSelectorID = gxPrintingExtensionBaseID
  1540. };
  1541.  
  1542.  
  1543. enum {
  1544.     gxExtensionScopeType        = FOUR_CHAR_CODE('scop'),
  1545.     gxDriverScopeID                = gxPrintingExtensionBaseID,
  1546.     gxPrinterScopeID            = gxPrintingExtensionBaseID + 1,
  1547.     gxPrinterExceptionScopeID    = gxPrintingExtensionBaseID + 2
  1548. };
  1549.  
  1550.  
  1551. enum {
  1552.     gxExtensionLoadType            = FOUR_CHAR_CODE('load'),
  1553.     gxExtensionLoadID            = gxPrintingExtensionBaseID
  1554. };
  1555.  
  1556.  
  1557. enum {
  1558.     gxExtensionLoadFirst        = 0x00000100,
  1559.     gxExtensionLoadAnywhere        = 0x7FFFFFFF,
  1560.     gxExtensionLoadLast            = (long)0xFFFFFF00
  1561. };
  1562.  
  1563.  
  1564. enum {
  1565.     gxExtensionOptimizationType    = FOUR_CHAR_CODE('eopt'),
  1566.     gxExtensionOptimizationID    = gxPrintingExtensionBaseID
  1567. };
  1568.  
  1569.  
  1570. /*    -----------------------------------------------
  1571.  
  1572.     Resource types and IDs used by driver writers
  1573.  
  1574.     ----------------------------------------------- */
  1575.  
  1576. enum {
  1577.     gxDriverUniversalOverrideID    = gxPrintingDriverBaseID,
  1578.     gxDriverImagingOverrideID    = gxPrintingDriverBaseID + 1,
  1579.     gxDriverCompatibilityOverrideID = gxPrintingDriverBaseID + 2
  1580. };
  1581.  
  1582.  
  1583. enum {
  1584.     gxDriverFileFormatType        = FOUR_CHAR_CODE('pfil'),
  1585.     gxDriverFileFormatID        = gxPrintingDriverBaseID
  1586. };
  1587.  
  1588.  
  1589.  
  1590. enum {
  1591.     gxDestinationAdditionType    = FOUR_CHAR_CODE('dsta'),
  1592.     gxDestinationAdditionID        = gxPrintingDriverBaseID
  1593. };
  1594.  
  1595.  
  1596. /* IMAGING RESOURCES */
  1597. /*    The imaging system resource specifies which imaging system a printer
  1598.         driver wishes to use. */
  1599.  
  1600.  
  1601. enum {
  1602.     gxImagingSystemSelectorType    = FOUR_CHAR_CODE('isys'),
  1603.     gxImagingSystemSelectorID    = gxPrintingDriverBaseID
  1604. };
  1605.  
  1606.  
  1607. /* 'exft' resource ID -- exclude font list */
  1608.  
  1609. enum {
  1610.     kExcludeFontListType        = FOUR_CHAR_CODE('exft'),
  1611.     kExcludeFontListID            = gxPrintingDriverBaseID
  1612. };
  1613.  
  1614. /* Resource for type for color matching */
  1615.  
  1616. enum {
  1617.     gxColorMatchingDataType        = FOUR_CHAR_CODE('prof'),
  1618.     gxColorMatchingDataID        = gxPrintingDriverBaseID
  1619. };
  1620.  
  1621.  
  1622. /* Resource type and id for the tray count */
  1623.  
  1624. enum {
  1625.     gxTrayCountDataType            = FOUR_CHAR_CODE('tray'),
  1626.     gxTrayCountDataID            = gxPrintingDriverBaseID
  1627. };
  1628.  
  1629.  
  1630. /* Resource type for the tray names */
  1631.  
  1632. enum {
  1633.     gxTrayNameDataType            = FOUR_CHAR_CODE('tryn')
  1634. };
  1635.  
  1636.  
  1637. /* Resource type for manual feed preferences, stored in DTP. */
  1638.  
  1639. enum {
  1640.     gxManualFeedAlertPrefsType    = FOUR_CHAR_CODE('mfpr'),
  1641.     gxManualFeedAlertPrefsID    = gxPrintingDriverBaseID
  1642. };
  1643.  
  1644. /* Resource type for desktop printer output characteristics, stored in DTP. */
  1645.  
  1646. enum {
  1647.     gxDriverOutputType            = FOUR_CHAR_CODE('outp'),
  1648.     gxDriverOutputTypeID        = 1
  1649. };
  1650.  
  1651.  
  1652. /* IO Resources */
  1653. /* Resource type and ID for default IO and buffering resources */
  1654.  
  1655. enum {
  1656.     gxUniversalIOPrefsType        = FOUR_CHAR_CODE('iobm'),
  1657.     gxUniversalIOPrefsID        = gxPrintingDriverBaseID
  1658. };
  1659.  
  1660.  
  1661. /*    Resource types and IDs for default implementation of CaptureOutputDevice.
  1662.         The default implementation of CaptureOutputDevice only handles PAP devices */
  1663.  
  1664. enum {
  1665.     gxCaptureType                = FOUR_CHAR_CODE('cpts'),
  1666.     gxCaptureStringID            = gxPrintingDriverBaseID,
  1667.     gxReleaseStringID            = gxPrintingDriverBaseID + 1,
  1668.     gxUncapturedAppleTalkType    = gxPrintingDriverBaseID + 2,
  1669.     gxCapturedAppleTalkType        = gxPrintingDriverBaseID + 3
  1670. };
  1671.  
  1672.  
  1673. /* Resource type and ID for custom halftone matrix */
  1674.  
  1675. enum {
  1676.     gxCustomMatrixType            = FOUR_CHAR_CODE('dmat'),
  1677.     gxCustomMatrixID            = gxPrintingDriverBaseID
  1678. };
  1679.  
  1680. /* Resource type and ID for raster driver rendering preferences */
  1681.  
  1682. enum {
  1683.     gxRasterPrefsType            = FOUR_CHAR_CODE('rdip'),
  1684.     gxRasterPrefsID                = gxPrintingDriverBaseID
  1685. };
  1686.  
  1687.  
  1688. /* Resource type for specifiying a colorset */
  1689.  
  1690. enum {
  1691.     gxColorSetResType            = FOUR_CHAR_CODE('crst')
  1692. };
  1693.  
  1694.  
  1695. /* Resource type and ID for raster driver packaging preferences */
  1696.  
  1697. enum {
  1698.     gxRasterPackType            = FOUR_CHAR_CODE('rpck'),
  1699.     gxRasterPackID                = gxPrintingDriverBaseID
  1700. };
  1701.  
  1702.  
  1703. /* Resource type and ID for raster driver packaging options */
  1704.  
  1705.  
  1706. enum {
  1707.     gxRasterNumNone                = 0,                            /* Number isn't output at all */
  1708.     gxRasterNumDirect            = 1,                            /* Lowest minWidth bytes as data */
  1709.     gxRasterNumToASCII            = 2                                /* minWidth ASCII characters */
  1710. };
  1711.  
  1712.  
  1713.  
  1714. enum {
  1715.     gxRasterPackOptionsType        = FOUR_CHAR_CODE('ropt'),
  1716.     gxRasterPackOptionsID        = gxPrintingDriverBaseID
  1717. };
  1718.  
  1719.  
  1720. /* Resource type for the PostScript imaging system procedure set control resource */
  1721.  
  1722. enum {
  1723.     gxPostscriptProcSetControlType = FOUR_CHAR_CODE('prec')
  1724. };
  1725.  
  1726.  
  1727. /* Resource type for the PostScript imaging system printer font resource */
  1728.  
  1729. enum {
  1730.     gxPostscriptPrinterFontType    = FOUR_CHAR_CODE('pfnt')
  1731. };
  1732.  
  1733.  
  1734. /* Resource type and ID for the PostScript imaging system imaging preferences */
  1735.  
  1736. enum {
  1737.     gxPostscriptPrefsType        = FOUR_CHAR_CODE('pdip'),
  1738.     gxPostscriptPrefsID            = gxPrintingDriverBaseID
  1739. };
  1740.  
  1741. /* Resource type and ID for the PostScript imaging system default scanning code */
  1742.  
  1743. enum {
  1744.     gxPostscriptScanningType    = FOUR_CHAR_CODE('scan'),
  1745.     gxPostscriptScanningID        = gxPrintingDriverBaseID
  1746. };
  1747.  
  1748.  
  1749. /* Old Application Support Resources */
  1750.  
  1751. enum {
  1752.     gxCustType                    = FOUR_CHAR_CODE('cust'),
  1753.     gxCustID                    = -8192
  1754. };
  1755.  
  1756.  
  1757.  
  1758. enum {
  1759.     gxReslType                    = FOUR_CHAR_CODE('resl'),
  1760.     gxReslID                    = -8192
  1761. };
  1762.  
  1763.  
  1764.  
  1765. enum {
  1766.     gxDiscreteResolution        = 0
  1767. };
  1768.  
  1769.  
  1770.  
  1771. enum {
  1772.     gxStlDialogResID            = -8192
  1773. };
  1774.  
  1775.  
  1776.  
  1777. enum {
  1778.     gxJobDialogResID            = -8191
  1779. };
  1780.  
  1781.  
  1782.  
  1783. enum {
  1784.     gxScaleTableType            = FOUR_CHAR_CODE('stab'),
  1785.     gxDITLControlType            = FOUR_CHAR_CODE('dctl')
  1786. };
  1787.  
  1788. /*    The default implementation of gxPrintDefault loads and
  1789.     PrValidates a print record stored in the following driver resource. */
  1790.  
  1791. enum {
  1792.     gxPrintRecordType            = FOUR_CHAR_CODE('PREC'),
  1793.     gxDefaultPrintRecordID        = 0
  1794. };
  1795.  
  1796.  
  1797. /*
  1798.     -----------------------------------------------
  1799.  
  1800.     Resource types and IDs used in papertype files
  1801.  
  1802.     -----------------------------------------------
  1803. */
  1804. /* Resource type and ID for driver papertypes placed in individual files */
  1805.  
  1806. enum {
  1807.     gxSignatureType                = FOUR_CHAR_CODE('sig '),
  1808.     gxPapertypeSignatureID        = 0
  1809. };
  1810.  
  1811.  
  1812. /* Papertype creator types */
  1813.  
  1814. enum {
  1815.     gxDrvrPaperType                = FOUR_CHAR_CODE('drpt'),
  1816.     gxSysPaperType                = FOUR_CHAR_CODE('sypt'),        /* System paper type creator */
  1817.     gxUserPaperType                = FOUR_CHAR_CODE('uspt'),        /* User paper type creator */
  1818.                                                                 /* Driver creator types == driver file's creator value */
  1819.     gxPaperTypeType                = FOUR_CHAR_CODE('ptyp')
  1820. };
  1821.  
  1822.  
  1823. /*********************************************************************
  1824.                     Start of old "GXPrintingMessages.h/a/p" interface file.
  1825.             **********************************************************************/
  1826. /* ------------------------------------------------------------------------------
  1827.  
  1828.                                     Constants and Types
  1829.  
  1830. -------------------------------------------------------------------------------- */
  1831. /*
  1832.  
  1833.     ABSTRACT DATA TYPES
  1834.  
  1835. */
  1836. typedef struct OpaquegxSpoolFile*         gxSpoolFile;
  1837. /*
  1838.  
  1839.     DIALOG PANEL CONSTANTS AND TYPES
  1840.  
  1841. */
  1842. typedef long                             gxPanelEvent;
  1843. /* Dialog panel event equates */
  1844.  
  1845. enum {
  1846.     gxPanelNoEvt                = 0L,
  1847.     gxPanelOpenEvt                = 1L,                            /* Initialize and draw */
  1848.     gxPanelCloseEvt                = 2L,                            /* Your panel is going away (panel switchL, confirm or cancel) */
  1849.     gxPanelHitEvt                = 3L,                            /* There's a hit in your panel */
  1850.     gxPanelActivateEvt            = 4L,                            /* The dialog window has just been activated */
  1851.     gxPanelDeactivateEvt        = 5L,                            /* The dialog window is about to be deactivated */
  1852.     gxPanelIconFocusEvt            = 6L,                            /* The focus changes from the panel to the icon list */
  1853.     gxPanelPanelFocusEvt        = 7L,                            /* The focus changes from the icon list to the panel */
  1854.     gxPanelFilterEvt            = 8L,                            /* Every event is filtered */
  1855.     gxPanelCancelEvt            = 9L,                            /* The user has cancelled the dialog */
  1856.     gxPanelConfirmEvt            = 10L,                            /* The user has confirmed the dialog */
  1857.     gxPanelDialogEvt            = 11L,                            /* Event to be handle by dialoghandler */
  1858.     gxPanelOtherEvt                = 12L,                            /* osEvts, etc. */
  1859.     gxPanelUserWillConfirmEvt    = 13L                            /* User has selected confirm, time to parse panel interdependencies */
  1860. };
  1861.  
  1862.  
  1863. /* Constants for panel responses to dialog handler calls */
  1864. typedef long                             gxPanelResult;
  1865.  
  1866. enum {
  1867.     gxPanelNoResult                = 0,
  1868.     gxPanelCancelConfirmation    = 1                                /* Only valid from panelUserWillConfirmEvt - used to keep the dialog from going away */
  1869. };
  1870.  
  1871.  
  1872. /* Panel event info record for FilterPanelEvent and HandlePanelEvent messages */
  1873. struct gxPanelInfoRecord {
  1874.     gxPanelEvent                     panelEvt;                    /* Why we were called */
  1875.     short                             panelResId;                    /* 'ppnl' resource ID of current panel */
  1876.     DialogPtr                         pDlg;                        /* Pointer to dialog */
  1877.     EventRecord *                    theEvent;                    /* Pointer to event */
  1878.     short                             itemHit;                    /* Actual item number as Dialog Mgr thinks */
  1879.     short                             itemCount;                    /* Number of items before your items */
  1880.     short                             evtAction;                    /* Once this event is processed, the action that will result */
  1881.                                                                 /* (evtAction is only meaningful during filtering) */
  1882.     short                             errorStringId;                /* STR ID of string to put in error alert (0 means no string) */
  1883.     gxFormat                         theFormat;                    /* The current format (only meaningful in a format dialog) */
  1884.     void *                            refCon;                        /* refCon passed in PanelSetupRecord */
  1885. };
  1886. typedef struct gxPanelInfoRecord gxPanelInfoRecord;
  1887.  
  1888. /* Constants for the evtAction field in PanelInfoRecord */
  1889.  
  1890. enum {
  1891.     gxOtherAction                = 0,                            /* Current item will not change */
  1892.     gxClosePanelAction            = 1,                            /* Panel will be closed */
  1893.     gxCancelDialogAction        = 2,                            /* Dialog will be cancelled */
  1894.     gxConfirmDialogAction        = 3                                /* Dialog will be confirmed */
  1895. };
  1896.  
  1897.  
  1898. /* Constants for the panelKind field in gxPanelSetupRecord */
  1899. typedef long                             gxPrintingPanelKind;
  1900. /* The gxPanelSetupInfo structure is passed to GXSetupDialogPanel */
  1901. struct gxPanelSetupRecord {
  1902.     gxPrintingPanelKind             panelKind;
  1903.     short                             panelResId;
  1904.     short                             resourceRefNum;
  1905.     void *                            refCon;
  1906. };
  1907. typedef struct gxPanelSetupRecord gxPanelSetupRecord;
  1908.  
  1909.  
  1910. enum {
  1911.     gxApplicationPanel            = 0L,
  1912.     gxExtensionPanel            = 1L,
  1913.     gxDriverPanel                = 2L
  1914. };
  1915.  
  1916.  
  1917. /* Constants returned by gxParsePageRange message */
  1918. typedef long                             gxParsePageRangeResult;
  1919.  
  1920. enum {
  1921.     gxRangeNotParsed            = 0L,                            /* Default initial value */
  1922.     gxRangeParsed                = 1L,                            /* Range has been parsed */
  1923.     gxRangeBadFromValue            = 2L,                            /* From value is bad */
  1924.     gxRangeBadToValue            = 3L                            /* To value is bad */
  1925. };
  1926.  
  1927. /*
  1928.  
  1929.     STATUS-RELATED CONSTANTS AND TYPES
  1930.  
  1931. */
  1932.  
  1933. /* Structure for status messages */
  1934. struct gxStatusRecord {
  1935.     unsigned short                     statusType;                    /* One of the ids listed above (nonFatalError, etc. ) */
  1936.     unsigned short                     statusId;                    /* Specific status (out of paper, etc.) */
  1937.     unsigned short                     statusAlertId;                /*    Printing alert ID (if any) for status */
  1938.     gxOwnerSignature                 statusOwner;                /* Creator type of status owner */
  1939.     short                             statResId;                    /* ID for 'stat' resource */
  1940.     short                             statResIndex;                /* Index into 'stat' resource for this status */
  1941.     short                             dialogResult;                /* ID of button string selected on dismissal of printing alert */
  1942.     unsigned short                     bufferLen;                    /* Number of bytes in status buffer - total record size must be <= 512 */
  1943.     char                             statusBuffer[1];            /* User response from alert */
  1944. };
  1945. typedef struct gxStatusRecord gxStatusRecord;
  1946.  
  1947.  
  1948. /* Constants for statusType field of gxStatusRecord */
  1949.  
  1950. enum {
  1951.     gxNonFatalError                = 1,                            /* An error occurred, but the job can continue */
  1952.     gxFatalError                = 2,                            /* A fatal error occurred-- halt job */
  1953.     gxPrinterReady                = 3,                            /* Tells QDGX to leave alert mode */
  1954.     gxUserAttention                = 4,                            /* Signals initiation of a modal alert */
  1955.     gxUserAlert                    = 5,                            /* Signals initiation of a moveable modal alert */
  1956.     gxPageTransmission            = 6,                            /* Signals page sent to printer, increments page count in strings to user */
  1957.     gxOpenConnectionStatus        = 7,                            /* Signals QDGX to begin animation on printer icon */
  1958.     gxInformationalStatus        = 8,                            /* Default status type, no side effects */
  1959.     gxSpoolingPageStatus        = 9,                            /* Signals page spooled, increments page count in spooling dialog */
  1960.     gxEndStatus                    = 10,                            /* Signals end of spooling */
  1961.     gxPercentageStatus            = 11                            /* Signals QDGX as to the amount of the job which is currently complete */
  1962. };
  1963.  
  1964.  
  1965. /* Structure for gxWriteStatusToDTPWindow message */
  1966. struct gxDisplayRecord {
  1967.     Boolean                         useText;                    /* Use text as opposed to a picture */
  1968.     char                             padByte;
  1969.     Handle                             hPicture;                    /* if !useText, the picture handle */
  1970.     Str255                             theText;                    /* if useText, the text */
  1971. };
  1972. typedef struct gxDisplayRecord gxDisplayRecord;
  1973.  
  1974.  
  1975. /*-----------------------------------------------*/
  1976. /* paper mapping-related constants and types...  */
  1977. /*-----------------------------------------------*/
  1978.  
  1979. typedef long                             gxTrayMapping;
  1980.  
  1981. enum {
  1982.     gxDefaultTrayMapping        = 0L,
  1983.     gxConfiguredTrayMapping        = 1L
  1984. };
  1985.  
  1986.  
  1987.  
  1988. /* ------------------------------------------------------------------------------
  1989.  
  1990.                 API Functions callable only from within message overrides
  1991.  
  1992. -------------------------------------------------------------------------------- */
  1993. #define GXPRINTINGDISPATCH(segID, selector) {0x203C, 0x0001, 0, 0x223C, (segID & 0x0FFF), selector << 2, 0xABFE}
  1994.  
  1995. /*
  1996.     Message Sending API Routines
  1997. */
  1998. #if TARGET_CPU_68K
  1999. EXTERN_API_C( OSErr )
  2000. GXPrintingDispatch                (long                     selector,
  2001.                                  ...)                                                        SIXWORDINLINE(0x221F, 0x203C, 0x0001, 0x0000, 0xABFE, 0x598F);
  2002.  
  2003. #endif  /* TARGET_CPU_68K */
  2004.  
  2005. /*
  2006.  
  2007.     How to use the GXPRINTINGDISPATCH macro...
  2008.     
  2009.     If your driver or extension is large, you may want to segment it
  2010.     across smaller boundaries than is permitted by the messaging system.
  2011.     Without using the Printing Manager's segmentation manager directly,
  2012.     the smallest segment you can create consists of the code to override
  2013.     a single message.  If you are overriding workhorse messages such as
  2014.     RenderPage, you may want to divide up the work among many functions
  2015.     distributed across several segments.  Here's how...
  2016.     
  2017.     The Printing Manager segment scheme involves the construction of a
  2018.     single 32-bit dispatch selector, which contains all the information
  2019.     necessary for the dispatcher to find a single routine.  It contains the
  2020.     segment's resource ID, and the offset within the segment which contains
  2021.     the start of the routine.  The GXPRINTINGDISPATCH macro will construct the
  2022.     dispatch selector for you, as well as the code to do the dispatch.
  2023.     
  2024.     Usually, it is convenient to start your segment with a long aligned jump table,
  2025.     beginning after the 4 byte header required by the Printing Manager.  The
  2026.     macro assumes this is the case and takes a 1-based routine selector from
  2027.     which it conmstructs the offset.
  2028.     
  2029.     For example, if your code is in resource 'pdvr' (print driver), ID=2
  2030.     at offset=12 (third routine in segment), you would declare your
  2031.     routine as follows:
  2032.     
  2033.     OSErr MyRenderingRoutine (long param1, Ptr param2)
  2034.         = GXPRINTINGDISPATCH(2, 3);
  2035.         
  2036.     Remember, ALL segment dispatches must return OSErr.  If your routine
  2037.     does not generate errors, you must still declare it to return OSErr
  2038.     and have the routine itself return noErr.
  2039.     
  2040.     An alternative way to call across segments is to call the GXPrintingDispatch
  2041.     function directly.  You must construct the 32-bit selector yourself and pass
  2042.     it as the first parameter.  This is usually not preferable since you don't get
  2043.     type-checking unless you declare a prototype as shown above, and your code
  2044.     isn't as easy to read.
  2045.     
  2046.     So given the above prototype, there are two ways to call the function:
  2047.     
  2048.         anErr = MyRenderingRoutine(p1, p2);            // Free type checking!
  2049.         
  2050.     or:
  2051.     
  2052.         #define kMyRenderRoutineSelector 0x0002000C
  2053.         anErr = GXPrintingDispatch(kMyRenderRoutineSelector, p1, p2);        // No type-checking!
  2054.     
  2055.     
  2056.     Both have the same effect.
  2057.  
  2058. */
  2059. EXTERN_API_C( gxJob )
  2060. GXGetJob                        (void)                                                        FOURWORDINLINE(0x203C, 0x0001, 0x0001, 0xABFE);
  2061.  
  2062. EXTERN_API_C( short )
  2063. GXGetMessageHandlerResFile        (void)                                                        FOURWORDINLINE(0x203C, 0x0001, 0x0002, 0xABFE);
  2064.  
  2065. EXTERN_API_C( Boolean )
  2066. GXSpoolingAborted                (void)                                                        FOURWORDINLINE(0x203C, 0x0001, 0x0003, 0xABFE);
  2067.  
  2068. EXTERN_API_C( OSErr )
  2069. GXJobIdle                        (void)                                                        FOURWORDINLINE(0x203C, 0x0001, 0x0004, 0xABFE);
  2070.  
  2071. EXTERN_API_C( OSErr )
  2072. GXReportStatus                    (long                     statusID,
  2073.                                  unsigned long             statusIndex)                        FOURWORDINLINE(0x203C, 0x0001, 0x0005, 0xABFE);
  2074.  
  2075. EXTERN_API_C( OSErr )
  2076. GXAlertTheUser                    (gxStatusRecord *        statusRec)                            FOURWORDINLINE(0x203C, 0x0001, 0x0006, 0xABFE);
  2077.  
  2078. EXTERN_API_C( OSErr )
  2079. GXSetupDialogPanel                (gxPanelSetupRecord *    panelRec)                            FOURWORDINLINE(0x203C, 0x0001, 0x0007, 0xABFE);
  2080.  
  2081. EXTERN_API_C( OSErr )
  2082. GXCountTrays                    (gxTrayIndex *            numTrays)                            FOURWORDINLINE(0x203C, 0x0001, 0x0008, 0xABFE);
  2083.  
  2084. EXTERN_API_C( OSErr )
  2085. GXGetTrayName                    (gxTrayIndex             trayNumber,
  2086.                                  Str31                     trayName)                            FOURWORDINLINE(0x203C, 0x0001, 0x0009, 0xABFE);
  2087.  
  2088. EXTERN_API_C( OSErr )
  2089. GXSetTrayPaperType                (gxTrayIndex             whichTray,
  2090.                                  gxPaperType             aPapertype)                            FOURWORDINLINE(0x203C, 0x0001, 0x000A, 0xABFE);
  2091.  
  2092. EXTERN_API_C( OSErr )
  2093. GXGetTrayPaperType                (gxTrayIndex             whichTray,
  2094.                                  gxPaperType             aPapertype)                            FOURWORDINLINE(0x203C, 0x0001, 0x000B, 0xABFE);
  2095.  
  2096. EXTERN_API_C( OSErr )
  2097. GXGetTrayMapping                (gxTrayMapping *        trayMapping)                        FOURWORDINLINE(0x203C, 0x0001, 0x000C, 0xABFE);
  2098.  
  2099. EXTERN_API_C( void )
  2100. GXCleanupStartJob                (void)                                                        FOURWORDINLINE(0x203C, 0x0001, 0x000D, 0xABFE);
  2101.  
  2102. EXTERN_API_C( void )
  2103. GXCleanupStartPage                (void)                                                        FOURWORDINLINE(0x203C, 0x0001, 0x000E, 0xABFE);
  2104.  
  2105. EXTERN_API_C( void )
  2106. GXCleanupOpenConnection            (void)                                                        FOURWORDINLINE(0x203C, 0x0001, 0x000F, 0xABFE);
  2107.  
  2108. EXTERN_API_C( void )
  2109. GXCleanupStartSendPage            (void)                                                        FOURWORDINLINE(0x203C, 0x0001, 0x0010, 0xABFE);
  2110.  
  2111.  
  2112. /* ------------------------------------------------------------------------------
  2113.  
  2114.                     Constants and types for Universal Printing Messages
  2115.  
  2116. -------------------------------------------------------------------------------- */
  2117.  
  2118. /* Options for gxCreateSpoolFile message */
  2119.  
  2120. enum {
  2121.     gxNoCreateOptions            = 0x00000000,                    /* Just create the file */
  2122.     gxInhibitAlias                = 0x00000001,                    /* Do not create an alias in the PMD folder */
  2123.     gxInhibitUniqueName            = 0x00000002,                    /* Do not append to the filename to make it unique */
  2124.     gxResolveBitmapAlias        = 0x00000004                    /* Resolve bitmap aliases and duplicate data in file */
  2125. };
  2126.  
  2127.  
  2128. /* Options for gxCloseSpoolFile message */
  2129.  
  2130. enum {
  2131.     gxNoCloseOptions            = 0x00000000,                    /* Just close the file */
  2132.     gxDeleteOnClose                = 0x00000001,                    /* Delete the file rather than closing it */
  2133.     gxUpdateJobData                = 0x00000002,                    /* Write current job information into file prior to closing */
  2134.     gxMakeRemoteFile            = 0x00000004                    /* Mark job as a remote file */
  2135. };
  2136.  
  2137.  
  2138. /* Options for gxCreateImageFile message */
  2139.  
  2140. enum {
  2141.     gxNoImageFile                = 0x00000000,                    /* Don't create image file */
  2142.     gxMakeImageFile                = 0x00000001,                    /* Create an image file */
  2143.     gxEachPlane                    = 0x00000002,                    /* Only save up planes before rewinding */
  2144.     gxEachPage                    = 0x00000004,                    /* Save up entire pages before rewinding */
  2145.     gxEntireFile                = gxEachPlane + gxEachPage        /* Save up the entire file before rewinding */
  2146. };
  2147.  
  2148.  
  2149. /* Options for gxBufferData message */
  2150.  
  2151. enum {
  2152.     gxNoBufferOptions            = 0x00000000,
  2153.     gxMakeBufferHex                = 0x00000001,
  2154.     gxDontSplitBuffer            = 0x00000002
  2155. };
  2156.  
  2157.  
  2158. /* Structure for gxDumpBuffer and gxFreeBuffer messages */
  2159. struct gxPrintingBuffer {
  2160.     long                             size;                        /* Size of buffer in bytes */
  2161.     long                             userData;                    /* Client assigned id for the buffer */
  2162.     char                             data[1];                    /* Array of size bytes */
  2163. };
  2164. typedef struct gxPrintingBuffer gxPrintingBuffer;
  2165.  
  2166.  
  2167. /* Structure for gxRenderPage message */
  2168. struct gxPageInfoRecord {
  2169.     long                             docPageNum;                    /* Number of page being printed */
  2170.     long                             copyNum;                    /* Copy number being printed */
  2171.     Boolean                         formatChanged;                /* True if format changed from last page */
  2172.     Boolean                         pageChanged;                /* True if page contents changed from last page */
  2173.     long                             internalUse;                /* Private */
  2174. };
  2175. typedef struct gxPageInfoRecord gxPageInfoRecord;
  2176.  
  2177.  
  2178. /* ------------------------------------------------------------------------------
  2179.  
  2180.                                 Universal Printing Messages
  2181.  
  2182. -------------------------------------------------------------------------------- */
  2183. typedef CALLBACK_API_C( OSErr , GXJobIdleProcPtr )(void );
  2184. typedef STACK_UPP_TYPE(GXJobIdleProcPtr)                         GXJobIdleUPP;
  2185. enum { uppGXJobIdleProcInfo = 0x00000021 };                     /* 2_bytes Func() */
  2186. #define NewGXJobIdleProc(userRoutine)                             (GXJobIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobIdleProcInfo, GetCurrentArchitecture())
  2187. #define CallGXJobIdleProc(userRoutine)                             CALL_ZERO_PARAMETER_UPP((userRoutine), uppGXJobIdleProcInfo)
  2188. #define Send_GXJobIdle() SendMessage(0x00000002)
  2189. #define Forward_GXJobIdle() ForwardThisMessage((void *) (0))
  2190.  
  2191. typedef CALLBACK_API_C( OSErr , GXJobStatusProcPtr )(gxStatusRecord *pStatus);
  2192. typedef STACK_UPP_TYPE(GXJobStatusProcPtr)                         GXJobStatusUPP;
  2193. enum { uppGXJobStatusProcInfo = 0x000000E1 };                     /* 2_bytes Func(4_bytes) */
  2194. #define NewGXJobStatusProc(userRoutine)                         (GXJobStatusUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobStatusProcInfo, GetCurrentArchitecture())
  2195. #define CallGXJobStatusProc(userRoutine, pStatus)                 CALL_ONE_PARAMETER_UPP((userRoutine), uppGXJobStatusProcInfo, (pStatus))
  2196. #define Send_GXJobStatus(pStatus) \
  2197.           SendMessage(0x00000003, pStatus)
  2198.  
  2199. #define Forward_GXJobStatus(pStatus) \
  2200.           ForwardThisMessage((void *) (pStatus))
  2201.  
  2202. typedef CALLBACK_API_C( OSErr , GXPrintingEventProcPtr )(EventRecord *evtRecord, Boolean filterEvent);
  2203. typedef STACK_UPP_TYPE(GXPrintingEventProcPtr)                     GXPrintingEventUPP;
  2204. enum { uppGXPrintingEventProcInfo = 0x000001E1 };                 /* 2_bytes Func(4_bytes, 1_byte) */
  2205. #define NewGXPrintingEventProc(userRoutine)                     (GXPrintingEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPrintingEventProcInfo, GetCurrentArchitecture())
  2206. #define CallGXPrintingEventProc(userRoutine, evtRecord, filterEvent)  CALL_TWO_PARAMETER_UPP((userRoutine), uppGXPrintingEventProcInfo, (evtRecord), (filterEvent))
  2207. #define Send_GXPrintingEvent(evtRecord, filterEvent) \
  2208.           SendMessage(0x00000004, evtRecord, filterEvent)
  2209.  
  2210. #define Forward_GXPrintingEvent(evtRecord, filterEvent) \
  2211.           ForwardThisMessage((void *) (evtRecord), (void *) (filterEvent))
  2212.  
  2213. typedef CALLBACK_API_C( OSErr , GXJobDefaultFormatDialogProcPtr )(gxDialogResult *dlgResult);
  2214. typedef STACK_UPP_TYPE(GXJobDefaultFormatDialogProcPtr)         GXJobDefaultFormatDialogUPP;
  2215. enum { uppGXJobDefaultFormatDialogProcInfo = 0x000000E1 };         /* 2_bytes Func(4_bytes) */
  2216. #define NewGXJobDefaultFormatDialogProc(userRoutine)             (GXJobDefaultFormatDialogUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobDefaultFormatDialogProcInfo, GetCurrentArchitecture())
  2217. #define CallGXJobDefaultFormatDialogProc(userRoutine, dlgResult)  CALL_ONE_PARAMETER_UPP((userRoutine), uppGXJobDefaultFormatDialogProcInfo, (dlgResult))
  2218. #define Send_GXJobDefaultFormatDialog(dlgResult) \
  2219.           SendMessage(0x00000005, dlgResult)
  2220.  
  2221. #define Forward_GXJobDefaultFormatDialog(dlgResult) \
  2222.           ForwardThisMessage((void *) (dlgResult))
  2223.  
  2224. typedef CALLBACK_API_C( OSErr , GXFormatDialogProcPtr )(gxFormat theFormat, StringPtr title, gxDialogResult *dlgResult);
  2225. typedef STACK_UPP_TYPE(GXFormatDialogProcPtr)                     GXFormatDialogUPP;
  2226. enum { uppGXFormatDialogProcInfo = 0x00000FE1 };                 /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2227. #define NewGXFormatDialogProc(userRoutine)                         (GXFormatDialogUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFormatDialogProcInfo, GetCurrentArchitecture())
  2228. #define CallGXFormatDialogProc(userRoutine, theFormat, title, dlgResult)  CALL_THREE_PARAMETER_UPP((userRoutine), uppGXFormatDialogProcInfo, (theFormat), (title), (dlgResult))
  2229. #define Send_GXFormatDialog(theFormat, title, dlgResult) \
  2230.           SendMessage(0x00000006, theFormat, title, dlgResult)
  2231.  
  2232. #define Forward_GXFormatDialog(theFormat, title, dlgResult) \
  2233.           ForwardThisMessage((void *) (theFormat),(void *) (title),(void *) (dlgResult))
  2234.  
  2235. typedef CALLBACK_API_C( OSErr , GXJobPrintDialogProcPtr )(gxDialogResult *dlgResult);
  2236. typedef STACK_UPP_TYPE(GXJobPrintDialogProcPtr)                 GXJobPrintDialogUPP;
  2237. enum { uppGXJobPrintDialogProcInfo = 0x000000E1 };                 /* 2_bytes Func(4_bytes) */
  2238. #define NewGXJobPrintDialogProc(userRoutine)                     (GXJobPrintDialogUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobPrintDialogProcInfo, GetCurrentArchitecture())
  2239. #define CallGXJobPrintDialogProc(userRoutine, dlgResult)         CALL_ONE_PARAMETER_UPP((userRoutine), uppGXJobPrintDialogProcInfo, (dlgResult))
  2240. #define Send_GXJobPrintDialog(dlgResult) \
  2241.           SendMessage(0x00000007, dlgResult)
  2242.  
  2243. #define Forward_GXJobPrintDialog(dlgResult) \
  2244.           ForwardThisMessage((void *) (dlgResult))
  2245.  
  2246. typedef CALLBACK_API_C( OSErr , GXFilterPanelEventProcPtr )(gxPanelInfoRecord *pHitInfo, Boolean *returnImmed);
  2247. typedef STACK_UPP_TYPE(GXFilterPanelEventProcPtr)                 GXFilterPanelEventUPP;
  2248. enum { uppGXFilterPanelEventProcInfo = 0x000003E1 };             /* 2_bytes Func(4_bytes, 4_bytes) */
  2249. #define NewGXFilterPanelEventProc(userRoutine)                     (GXFilterPanelEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFilterPanelEventProcInfo, GetCurrentArchitecture())
  2250. #define CallGXFilterPanelEventProc(userRoutine, pHitInfo, returnImmed)  CALL_TWO_PARAMETER_UPP((userRoutine), uppGXFilterPanelEventProcInfo, (pHitInfo), (returnImmed))
  2251. #define Send_GXFilterPanelEvent(pHitInfo, returnImmed) \
  2252.           SendMessage(0x00000008, pHitInfo, returnImmed)
  2253.  
  2254. typedef CALLBACK_API_C( OSErr , GXHandlePanelEventProcPtr )(gxPanelInfoRecord *pHitInfo, gxPanelResult *panelResponse);
  2255. typedef STACK_UPP_TYPE(GXHandlePanelEventProcPtr)                 GXHandlePanelEventUPP;
  2256. enum { uppGXHandlePanelEventProcInfo = 0x000003E1 };             /* 2_bytes Func(4_bytes, 4_bytes) */
  2257. #define NewGXHandlePanelEventProc(userRoutine)                     (GXHandlePanelEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandlePanelEventProcInfo, GetCurrentArchitecture())
  2258. #define CallGXHandlePanelEventProc(userRoutine, pHitInfo, panelResponse)  CALL_TWO_PARAMETER_UPP((userRoutine), uppGXHandlePanelEventProcInfo, (pHitInfo), (panelResponse))
  2259. #define Send_GXHandlePanelEvent(pHitInfo, panelResponse) \
  2260.           SendMessage(0x00000009, pHitInfo, panelResponse)
  2261.  
  2262. typedef CALLBACK_API_C( OSErr , GXParsePageRangeProcPtr )(StringPtr fromString, StringPtr toString, gxParsePageRangeResult *result);
  2263. typedef STACK_UPP_TYPE(GXParsePageRangeProcPtr)                 GXParsePageRangeUPP;
  2264. enum { uppGXParsePageRangeProcInfo = 0x00000FE1 };                 /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2265. #define NewGXParsePageRangeProc(userRoutine)                     (GXParsePageRangeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXParsePageRangeProcInfo, GetCurrentArchitecture())
  2266. #define CallGXParsePageRangeProc(userRoutine, fromString, toString, result)  CALL_THREE_PARAMETER_UPP((userRoutine), uppGXParsePageRangeProcInfo, (fromString), (toString), (result))
  2267. #define Send_GXParsePageRange(fromString, toString, result) \
  2268.           SendMessage(0x0000000A, fromString, toString, result)
  2269.  
  2270. #define Forward_GXParsePageRange(fromString, toString, result) \
  2271.           ForwardThisMessage((void *) (fromString), (void *) (toString), (void *) (result))
  2272.  
  2273. typedef CALLBACK_API_C( OSErr , GXDefaultJobProcPtr )(void );
  2274. typedef STACK_UPP_TYPE(GXDefaultJobProcPtr)                     GXDefaultJobUPP;
  2275. enum { uppGXDefaultJobProcInfo = 0x00000021 };                     /* 2_bytes Func() */
  2276. #define NewGXDefaultJobProc(userRoutine)                         (GXDefaultJobUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultJobProcInfo, GetCurrentArchitecture())
  2277. #define CallGXDefaultJobProc(userRoutine)                         CALL_ZERO_PARAMETER_UPP((userRoutine), uppGXDefaultJobProcInfo)
  2278. #define Send_GXDefaultJob() SendMessage(0x0000000B)
  2279. #define Forward_GXDefaultJob() ForwardThisMessage((void *) (0))
  2280.  
  2281. typedef CALLBACK_API_C( OSErr , GXDefaultFormatProcPtr )(gxFormat theFormat);
  2282. typedef STACK_UPP_TYPE(GXDefaultFormatProcPtr)                     GXDefaultFormatUPP;
  2283. enum { uppGXDefaultFormatProcInfo = 0x000000E1 };                 /* 2_bytes Func(4_bytes) */
  2284. #define NewGXDefaultFormatProc(userRoutine)                     (GXDefaultFormatUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultFormatProcInfo, GetCurrentArchitecture())
  2285. #define CallGXDefaultFormatProc(userRoutine, theFormat)         CALL_ONE_PARAMETER_UPP((userRoutine), uppGXDefaultFormatProcInfo, (theFormat))
  2286. #define Send_GXDefaultFormat(theFormat) \
  2287.           SendMessage(0x0000000C, theFormat)
  2288.  
  2289. #define Forward_GXDefaultFormat(theFormat) \
  2290.           ForwardThisMessage((void *) (theFormat))
  2291.  
  2292. typedef CALLBACK_API_C( OSErr , GXDefaultPaperTypeProcPtr )(gxPaperType thePaperType);
  2293. typedef STACK_UPP_TYPE(GXDefaultPaperTypeProcPtr)                 GXDefaultPaperTypeUPP;
  2294. enum { uppGXDefaultPaperTypeProcInfo = 0x000000E1 };             /* 2_bytes Func(4_bytes) */
  2295. #define NewGXDefaultPaperTypeProc(userRoutine)                     (GXDefaultPaperTypeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultPaperTypeProcInfo, GetCurrentArchitecture())
  2296. #define CallGXDefaultPaperTypeProc(userRoutine, thePaperType)     CALL_ONE_PARAMETER_UPP((userRoutine), uppGXDefaultPaperTypeProcInfo, (thePaperType))
  2297. #define Send_GXDefaultPaperType(thePaperType) \
  2298.           SendMessage(0x0000000D, thePaperType)
  2299.  
  2300. #define Forward_GXDefaultPaperType(thePaperType) \
  2301.           ForwardThisMessage((void *) thePaperType)
  2302.  
  2303. typedef CALLBACK_API_C( OSErr , GXDefaultPrinterProcPtr )(gxPrinter thePrinter);
  2304. typedef STACK_UPP_TYPE(GXDefaultPrinterProcPtr)                 GXDefaultPrinterUPP;
  2305. enum { uppGXDefaultPrinterProcInfo = 0x000000E1 };                 /* 2_bytes Func(4_bytes) */
  2306. #define NewGXDefaultPrinterProc(userRoutine)                     (GXDefaultPrinterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultPrinterProcInfo, GetCurrentArchitecture())
  2307. #define CallGXDefaultPrinterProc(userRoutine, thePrinter)         CALL_ONE_PARAMETER_UPP((userRoutine), uppGXDefaultPrinterProcInfo, (thePrinter))
  2308. #define Send_GXDefaultPrinter(thePrinter) \
  2309.           SendMessage(0x0000000E, thePrinter)
  2310.  
  2311. #define Forward_GXDefaultPrinter(thePrinter) \
  2312.           ForwardThisMessage((void *) thePrinter)
  2313.  
  2314. typedef CALLBACK_API_C( OSErr , GXCreateSpoolFileProcPtr )(FSSpecPtr pFileSpec, long createOptions, gxSpoolFile *theSpoolFile);
  2315. typedef STACK_UPP_TYPE(GXCreateSpoolFileProcPtr)                 GXCreateSpoolFileUPP;
  2316. enum { uppGXCreateSpoolFileProcInfo = 0x00000FE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2317. #define NewGXCreateSpoolFileProc(userRoutine)                     (GXCreateSpoolFileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCreateSpoolFileProcInfo, GetCurrentArchitecture())
  2318. #define CallGXCreateSpoolFileProc(userRoutine, pFileSpec, createOptions, theSpoolFile)  CALL_THREE_PARAMETER_UPP((userRoutine), uppGXCreateSpoolFileProcInfo, (pFileSpec), (createOptions), (theSpoolFile))
  2319. #define Send_GXCreateSpoolFile(pFileSpec, createOptions, theSpoolFile) \
  2320.           SendMessage(0x0000000F, pFileSpec, createOptions, \
  2321.                             theSpoolFile)
  2322.  
  2323. #define Forward_GXCreateSpoolFile(pFileSpec, createOptions, theSpoolFile) \
  2324.           ForwardThisMessage((void *) pFileSpec, (void *) (createOptions), (void *) theSpoolFile)
  2325.  
  2326. typedef CALLBACK_API_C( OSErr , GXSpoolPageProcPtr )(gxSpoolFile theSpoolFile, gxFormat theFormat, gxShape thePage);
  2327. typedef STACK_UPP_TYPE(GXSpoolPageProcPtr)                         GXSpoolPageUPP;
  2328. enum { uppGXSpoolPageProcInfo = 0x00000FE1 };                     /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2329. #define NewGXSpoolPageProc(userRoutine)                         (GXSpoolPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSpoolPageProcInfo, GetCurrentArchitecture())
  2330. #define CallGXSpoolPageProc(userRoutine, theSpoolFile, theFormat, thePage)  CALL_THREE_PARAMETER_UPP((userRoutine), uppGXSpoolPageProcInfo, (theSpoolFile), (theFormat), (thePage))
  2331. #define Send_GXSpoolPage(theSpoolFile, theFormat, thePage) \
  2332.           SendMessage(0x00000010, theSpoolFile, theFormat, thePage)
  2333.  
  2334. #define Forward_GXSpoolPage(theSpoolFile, theFormat, thePage) \
  2335.           ForwardThisMessage((void *) theSpoolFile, (void *) theFormat, (void *) thePage)
  2336.  
  2337. typedef CALLBACK_API_C( OSErr , GXSpoolDataProcPtr )(gxSpoolFile theSpoolFile, Ptr data, long *length);
  2338. typedef STACK_UPP_TYPE(GXSpoolDataProcPtr)                         GXSpoolDataUPP;
  2339. enum { uppGXSpoolDataProcInfo = 0x00000FE1 };                     /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2340. #define NewGXSpoolDataProc(userRoutine)                         (GXSpoolDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSpoolDataProcInfo, GetCurrentArchitecture())
  2341. #define CallGXSpoolDataProc(userRoutine, theSpoolFile, data, length)  CALL_THREE_PARAMETER_UPP((userRoutine), uppGXSpoolDataProcInfo, (theSpoolFile), (data), (length))
  2342. #define Send_GXSpoolData(theSpoolFile, data, length) \
  2343.           SendMessage(0x00000011, theSpoolFile, data, length)
  2344.  
  2345. #define Forward_GXSpoolData(theSpoolFile, data, length) \
  2346.           ForwardThisMessage((void *) theSpoolFile, (void *) data, (void *) length)
  2347.  
  2348. typedef CALLBACK_API_C( OSErr , GXSpoolResourceProcPtr )(gxSpoolFile theSpoolFile, Handle theResource, ResType theType, long id);
  2349. typedef STACK_UPP_TYPE(GXSpoolResourceProcPtr)                     GXSpoolResourceUPP;
  2350. enum { uppGXSpoolResourceProcInfo = 0x00003FE1 };                 /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  2351. #define NewGXSpoolResourceProc(userRoutine)                     (GXSpoolResourceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSpoolResourceProcInfo, GetCurrentArchitecture())
  2352. #define CallGXSpoolResourceProc(userRoutine, theSpoolFile, theResource, theType, id)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppGXSpoolResourceProcInfo, (theSpoolFile), (theResource), (theType), (id))
  2353. #define Send_GXSpoolResource(theSpoolFile, theResource, theType, id) \
  2354.           SendMessage(0x00000012, theSpoolFile, theResource, \
  2355.                             theType, id)
  2356.  
  2357. #define Forward_GXSpoolResource(theSpoolFile, theResource, theType, id) \
  2358.           ForwardThisMessage((void *) theSpoolFile, (void *) theResource, \
  2359.                                       (void *) theType, (void *) (id))
  2360.  
  2361. typedef CALLBACK_API_C( OSErr , GXCompleteSpoolFileProcPtr )(gxSpoolFile theSpoolFile);
  2362. typedef STACK_UPP_TYPE(GXCompleteSpoolFileProcPtr)                 GXCompleteSpoolFileUPP;
  2363. enum { uppGXCompleteSpoolFileProcInfo = 0x000000E1 };             /* 2_bytes Func(4_bytes) */
  2364. #define NewGXCompleteSpoolFileProc(userRoutine)                 (GXCompleteSpoolFileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCompleteSpoolFileProcInfo, GetCurrentArchitecture())
  2365. #define CallGXCompleteSpoolFileProc(userRoutine, theSpoolFile)     CALL_ONE_PARAMETER_UPP((userRoutine), uppGXCompleteSpoolFileProcInfo, (theSpoolFile))
  2366. #define Send_GXCompleteSpoolFile(theSpoolFile) \
  2367.           SendMessage(0x00000013, theSpoolFile)
  2368.  
  2369. #define Forward_GXCompleteSpoolFile(theSpoolFile) \
  2370.           ForwardThisMessage((void *) (theSpoolFile))
  2371.  
  2372. typedef CALLBACK_API_C( OSErr , GXCountPagesProcPtr )(gxSpoolFile theSpoolFile, long *numPages);
  2373. typedef STACK_UPP_TYPE(GXCountPagesProcPtr)                     GXCountPagesUPP;
  2374. enum { uppGXCountPagesProcInfo = 0x000003E1 };                     /* 2_bytes Func(4_bytes, 4_bytes) */
  2375. #define NewGXCountPagesProc(userRoutine)                         (GXCountPagesUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCountPagesProcInfo, GetCurrentArchitecture())
  2376. #define CallGXCountPagesProc(userRoutine, theSpoolFile, numPages)  CALL_TWO_PARAMETER_UPP((userRoutine), uppGXCountPagesProcInfo, (theSpoolFile), (numPages))
  2377. #define Send_GXCountPages(theSpoolFile, numPages) \
  2378.           SendMessage(0x00000014, theSpoolFile, numPages)
  2379.  
  2380. #define Forward_GXCountPages(theSpoolFile, numPages) \
  2381.           ForwardThisMessage((void *) (theSpoolFile), (void *) (numPages))
  2382.  
  2383. typedef CALLBACK_API_C( OSErr , GXDespoolPageProcPtr )(gxSpoolFile theSpoolFile, long numPages, gxFormat theFormat, gxShape *thePage, Boolean *formatChanged);
  2384. typedef STACK_UPP_TYPE(GXDespoolPageProcPtr)                     GXDespoolPageUPP;
  2385. enum { uppGXDespoolPageProcInfo = 0x0000FFE1 };                 /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  2386. #define NewGXDespoolPageProc(userRoutine)                         (GXDespoolPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDespoolPageProcInfo, GetCurrentArchitecture())
  2387. #define CallGXDespoolPageProc(userRoutine, theSpoolFile, numPages, theFormat, thePage, formatChanged)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppGXDespoolPageProcInfo, (theSpoolFile), (numPages), (theFormat), (thePage), (formatChanged))
  2388. #define Send_GXDespoolPage(theSpoolFile, numPages, theFormat, thePage, formatChanged) \
  2389.           SendMessage(0x00000015, theSpoolFile, numPages, \
  2390.                             theFormat, thePage, formatChanged)
  2391.  
  2392. #define Forward_GXDespoolPage(theSpoolFile, numPages, theFormat, thePage, formatChanged) \
  2393.           ForwardThisMessage((void *) (theSpoolFile), (void *) (numPages), (void *) (theFormat), \
  2394.                                       (void *) (thePage), (void *) (formatChanged))
  2395.  
  2396. typedef CALLBACK_API_C( OSErr , GXDespoolDataProcPtr )(gxSpoolFile theSpoolFile, Ptr data, long *length);
  2397. typedef STACK_UPP_TYPE(GXDespoolDataProcPtr)                     GXDespoolDataUPP;
  2398. enum { uppGXDespoolDataProcInfo = 0x00000FE1 };                 /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2399. #define NewGXDespoolDataProc(userRoutine)                         (GXDespoolDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDespoolDataProcInfo, GetCurrentArchitecture())
  2400. #define CallGXDespoolDataProc(userRoutine, theSpoolFile, data, length)  CALL_THREE_PARAMETER_UPP((userRoutine), uppGXDespoolDataProcInfo, (theSpoolFile), (data), (length))
  2401. #define Send_GXDespoolData(theSpoolFile, data, length) \
  2402.           SendMessage(0x00000016, theSpoolFile, data, length)
  2403.  
  2404. #define Forward_GXDespoolData(theSpoolFile, data, length) \
  2405.           ForwardThisMessage((void *) (theSpoolFile), (void *) (data), (void *) (length))
  2406.  
  2407. typedef CALLBACK_API_C( OSErr , GXDespoolResourceProcPtr )(gxSpoolFile theSpoolFile, ResType theType, long id, Handle *theResource);
  2408. typedef STACK_UPP_TYPE(GXDespoolResourceProcPtr)                 GXDespoolResourceUPP;
  2409. enum { uppGXDespoolResourceProcInfo = 0x00003FE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  2410. #define NewGXDespoolResourceProc(userRoutine)                     (GXDespoolResourceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDespoolResourceProcInfo, GetCurrentArchitecture())
  2411. #define CallGXDespoolResourceProc(userRoutine, theSpoolFile, theType, id, theResource)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppGXDespoolResourceProcInfo, (theSpoolFile), (theType), (id), (theResource))
  2412. #define Send_GXDespoolResource(theSpoolFile, theType, id, theResource) \
  2413.           SendMessage(0x00000017, theSpoolFile, theType, \
  2414.                             id, theResource)
  2415.  
  2416. #define Forward_GXDespoolResource(theSpoolFile, theType, id, theResource) \
  2417.           ForwardThisMessage((void *) (theSpoolFile), (void *) (theType), (void *) (id), \
  2418.                                       (void *) (theResource))
  2419.  
  2420. typedef CALLBACK_API_C( OSErr , GXCloseSpoolFileProcPtr )(gxSpoolFile theSpoolFile, long closeOptions);
  2421. typedef STACK_UPP_TYPE(GXCloseSpoolFileProcPtr)                 GXCloseSpoolFileUPP;
  2422. enum { uppGXCloseSpoolFileProcInfo = 0x000003E1 };                 /* 2_bytes Func(4_bytes, 4_bytes) */
  2423. #define NewGXCloseSpoolFileProc(userRoutine)                     (GXCloseSpoolFileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCloseSpoolFileProcInfo, GetCurrentArchitecture())
  2424. #define CallGXCloseSpoolFileProc(userRoutine, theSpoolFile, closeOptions)  CALL_TWO_PARAMETER_UPP((userRoutine), uppGXCloseSpoolFileProcInfo, (theSpoolFile), (closeOptions))
  2425. #define Send_GXCloseSpoolFile(theSpoolFile, closeOptions) \
  2426.           SendMessage(0x00000018, theSpoolFile, closeOptions)
  2427.  
  2428. #define Forward_GXCloseSpoolFile(theSpoolFile, closeOptions) \
  2429.           ForwardThisMessage((void *) (theSpoolFile), (void *) (closeOptions))
  2430.  
  2431. typedef CALLBACK_API_C( OSErr , GXStartJobProcPtr )(StringPtr docName, long pageCount);
  2432. typedef STACK_UPP_TYPE(GXStartJobProcPtr)                         GXStartJobUPP;
  2433. enum { uppGXStartJobProcInfo = 0x000003E1 };                     /* 2_bytes Func(4_bytes, 4_bytes) */
  2434. #define NewGXStartJobProc(userRoutine)                             (GXStartJobUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXStartJobProcInfo, GetCurrentArchitecture())
  2435. #define CallGXStartJobProc(userRoutine, docName, pageCount)     CALL_TWO_PARAMETER_UPP((userRoutine), uppGXStartJobProcInfo, (docName), (pageCount))
  2436. #define Send_GXStartJob(docName, pageCount) \
  2437.           SendMessage(0x00000019, docName, pageCount)
  2438.  
  2439. #define Forward_GXStartJob(docName, pageCount) \
  2440.           ForwardThisMessage((void *) (docName), (void *) (pageCount))
  2441.  
  2442. typedef CALLBACK_API_C( OSErr , GXFinishJobProcPtr )(void );
  2443. typedef STACK_UPP_TYPE(GXFinishJobProcPtr)                         GXFinishJobUPP;
  2444. enum { uppGXFinishJobProcInfo = 0x00000021 };                     /* 2_bytes Func() */
  2445. #define NewGXFinishJobProc(userRoutine)                         (GXFinishJobUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFinishJobProcInfo, GetCurrentArchitecture())
  2446. #define CallGXFinishJobProc(userRoutine)                         CALL_ZERO_PARAMETER_UPP((userRoutine), uppGXFinishJobProcInfo)
  2447. #define Send_GXFinishJob() SendMessage(0x0000001A)
  2448. #define Forward_GXFinishJob() ForwardThisMessage((void *) (0))
  2449.  
  2450. typedef CALLBACK_API_C( OSErr , GXStartPageProcPtr )(gxFormat theFormat, long numViewPorts, gxViewPort *viewPortList);
  2451. typedef STACK_UPP_TYPE(GXStartPageProcPtr)                         GXStartPageUPP;
  2452. enum { uppGXStartPageProcInfo = 0x00000FE1 };                     /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2453. #define NewGXStartPageProc(userRoutine)                         (GXStartPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXStartPageProcInfo, GetCurrentArchitecture())
  2454. #define CallGXStartPageProc(userRoutine, theFormat, numViewPorts, viewPortList)  CALL_THREE_PARAMETER_UPP((userRoutine), uppGXStartPageProcInfo, (theFormat), (numViewPorts), (viewPortList))
  2455. #define Send_GXStartPage(theFormat, numViewPorts, viewPortList) \
  2456.           SendMessage(0x0000001B, theFormat, numViewPorts, viewPortList)
  2457.  
  2458. #define Forward_GXStartPage(theFormat, numViewPorts, viewPortList) \
  2459.           ForwardThisMessage((void *) (theFormat), (void *) (numViewPorts), (void *) (viewPortList))
  2460.  
  2461. typedef CALLBACK_API_C( OSErr , GXFinishPageProcPtr )(void );
  2462. typedef STACK_UPP_TYPE(GXFinishPageProcPtr)                     GXFinishPageUPP;
  2463. enum { uppGXFinishPageProcInfo = 0x00000021 };                     /* 2_bytes Func() */
  2464. #define NewGXFinishPageProc(userRoutine)                         (GXFinishPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFinishPageProcInfo, GetCurrentArchitecture())
  2465. #define CallGXFinishPageProc(userRoutine)                         CALL_ZERO_PARAMETER_UPP((userRoutine), uppGXFinishPageProcInfo)
  2466. #define Send_GXFinishPage() SendMessage(0x0000001C)
  2467. #define Forward_GXFinishPage() ForwardThisMessage((void *) (0))
  2468.  
  2469. typedef CALLBACK_API_C( OSErr , GXPrintPageProcPtr )(gxFormat theFormat, gxShape thePage);
  2470. typedef STACK_UPP_TYPE(GXPrintPageProcPtr)                         GXPrintPageUPP;
  2471. enum { uppGXPrintPageProcInfo = 0x000003E1 };                     /* 2_bytes Func(4_bytes, 4_bytes) */
  2472. #define NewGXPrintPageProc(userRoutine)                         (GXPrintPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPrintPageProcInfo, GetCurrentArchitecture())
  2473. #define CallGXPrintPageProc(userRoutine, theFormat, thePage)     CALL_TWO_PARAMETER_UPP((userRoutine), uppGXPrintPageProcInfo, (theFormat), (thePage))
  2474. #define Send_GXPrintPage(theFormat, thePage) \
  2475.           SendMessage(0x0000001D, theFormat, thePage)
  2476.  
  2477. #define Forward_GXPrintPage(theFormat, thePage) \
  2478.           ForwardThisMessage((void *) (theFormat), (void *) (thePage))
  2479.  
  2480. typedef CALLBACK_API_C( OSErr , GXSetupImageDataProcPtr )(void *imageData);
  2481. typedef STACK_UPP_TYPE(GXSetupImageDataProcPtr)                 GXSetupImageDataUPP;
  2482. enum { uppGXSetupImageDataProcInfo = 0x000000E1 };                 /* 2_bytes Func(4_bytes) */
  2483. #define NewGXSetupImageDataProc(userRoutine)                     (GXSetupImageDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSetupImageDataProcInfo, GetCurrentArchitecture())
  2484. #define CallGXSetupImageDataProc(userRoutine, imageData)         CALL_ONE_PARAMETER_UPP((userRoutine), uppGXSetupImageDataProcInfo, (imageData))
  2485. #define Send_GXSetupImageData(imageData) \
  2486.           SendMessage(0x0000001E, imageData)
  2487.  
  2488. #define Forward_GXSetupImageData(imageData) \
  2489.           ForwardThisMessage((void *) (imageData))
  2490.  
  2491. typedef CALLBACK_API_C( OSErr , GXImageJobProcPtr )(gxSpoolFile theSpoolFile, long *closeOptions);
  2492. typedef STACK_UPP_TYPE(GXImageJobProcPtr)                         GXImageJobUPP;
  2493. enum { uppGXImageJobProcInfo = 0x000003E1 };                     /* 2_bytes Func(4_bytes, 4_bytes) */
  2494. #define NewGXImageJobProc(userRoutine)                             (GXImageJobUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXImageJobProcInfo, GetCurrentArchitecture())
  2495. #define CallGXImageJobProc(userRoutine, theSpoolFile, closeOptions)  CALL_TWO_PARAMETER_UPP((userRoutine), uppGXImageJobProcInfo, (theSpoolFile), (closeOptions))
  2496. #define Send_GXImageJob(theSpoolFile, closeOptions) \
  2497.           SendMessage(0x0000001F, theSpoolFile, closeOptions)
  2498.  
  2499. #define Forward_GXImageJob(theSpoolFile, closeOptions) \
  2500.           ForwardThisMessage((void *) (theSpoolFile), (void *) (closeOptions))
  2501.  
  2502. typedef CALLBACK_API_C( OSErr , GXImageDocumentProcPtr )(gxSpoolFile theSpoolFile, void *imageData);
  2503. typedef STACK_UPP_TYPE(GXImageDocumentProcPtr)                     GXImageDocumentUPP;
  2504. enum { uppGXImageDocumentProcInfo = 0x000003E1 };                 /* 2_bytes Func(4_bytes, 4_bytes) */
  2505. #define NewGXImageDocumentProc(userRoutine)                     (GXImageDocumentUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXImageDocumentProcInfo, GetCurrentArchitecture())
  2506. #define CallGXImageDocumentProc(userRoutine, theSpoolFile, imageData)  CALL_TWO_PARAMETER_UPP((userRoutine), uppGXImageDocumentProcInfo, (theSpoolFile), (imageData))
  2507. #define Send_GXImageDocument(theSpoolFile, imageData) \
  2508.           SendMessage(0x00000020, theSpoolFile, imageData)
  2509.  
  2510. #define Forward_GXImageDocument(theSpoolFile, imageData) \
  2511.           ForwardThisMessage((void *) (theSpoolFile), (void *) (imageData))
  2512.  
  2513. typedef CALLBACK_API_C( OSErr , GXImagePageProcPtr )(gxSpoolFile theSpoolFile, long pageNumber, gxFormat theFormat, void *imageData);
  2514. typedef STACK_UPP_TYPE(GXImagePageProcPtr)                         GXImagePageUPP;
  2515. enum { uppGXImagePageProcInfo = 0x00003FE1 };                     /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  2516. #define NewGXImagePageProc(userRoutine)                         (GXImagePageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXImagePageProcInfo, GetCurrentArchitecture())
  2517. #define CallGXImagePageProc(userRoutine, theSpoolFile, pageNumber, theFormat, imageData)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppGXImagePageProcInfo, (theSpoolFile), (pageNumber), (theFormat), (imageData))
  2518. #define Send_GXImagePage(theSpoolFile, pageNumber, theFormat, imageData) \
  2519.           SendMessage(0x00000021, theSpoolFile, pageNumber, theFormat, imageData)
  2520.  
  2521. #define Forward_GXImagePage(theSpoolFile, pageNumber, theFormat, imageData) \
  2522.           ForwardThisMessage((void *) (theSpoolFile), (void *) (pageNumber), (void *) (theFormat), \
  2523.                                       (void *) (imageData))
  2524.  
  2525. typedef CALLBACK_API_C( OSErr , GXRenderPageProcPtr )(gxFormat theFormat, gxShape thePage, gxPageInfoRecord *pageInfo, void *imageData);
  2526. typedef STACK_UPP_TYPE(GXRenderPageProcPtr)                     GXRenderPageUPP;
  2527. enum { uppGXRenderPageProcInfo = 0x00003FE1 };                     /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  2528. #define NewGXRenderPageProc(userRoutine)                         (GXRenderPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXRenderPageProcInfo, GetCurrentArchitecture())
  2529. #define CallGXRenderPageProc(userRoutine, theFormat, thePage, pageInfo, imageData)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppGXRenderPageProcInfo, (theFormat), (thePage), (pageInfo), (imageData))
  2530. #define Send_GXRenderPage(theFormat, thePage, pageInfo, imageData) \
  2531.           SendMessage(0x00000022, theFormat, thePage, pageInfo, imageData)
  2532.  
  2533. #define Forward_GXRenderPage(theFormat, thePage, pageInfo, imageData) \
  2534.           ForwardThisMessage((void *) (theFormat), (void *) (thePage), (void *) (pageInfo), (void *) (imageData))
  2535.  
  2536. typedef CALLBACK_API_C( OSErr , GXCreateImageFileProcPtr )(FSSpecPtr pFileSpec, long imageFileOptions, long *theImageFile);
  2537. typedef STACK_UPP_TYPE(GXCreateImageFileProcPtr)                 GXCreateImageFileUPP;
  2538. enum { uppGXCreateImageFileProcInfo = 0x00000FE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2539. #define NewGXCreateImageFileProc(userRoutine)                     (GXCreateImageFileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCreateImageFileProcInfo, GetCurrentArchitecture())
  2540. #define CallGXCreateImageFileProc(userRoutine, pFileSpec, imageFileOptions, theImageFile)  CALL_THREE_PARAMETER_UPP((userRoutine), uppGXCreateImageFileProcInfo, (pFileSpec), (imageFileOptions), (theImageFile))
  2541. #define Send_GXCreateImageFile(pFileSpec, imageFileOptions, theImageFile) \
  2542.           SendMessage(0x00000023, pFileSpec, imageFileOptions, theImageFile)
  2543.  
  2544. #define Forward_GXCreateImageFile(pFileSpec, imageFileOptions, theImageFile) \
  2545.           ForwardThisMessage((void *) (pFileSpec), (void *) (imageFileOptions), (void *) (theImageFile))
  2546.  
  2547. typedef CALLBACK_API_C( OSErr , GXOpenConnectionProcPtr )(void );
  2548. typedef STACK_UPP_TYPE(GXOpenConnectionProcPtr)                 GXOpenConnectionUPP;
  2549. enum { uppGXOpenConnectionProcInfo = 0x00000021 };                 /* 2_bytes Func() */
  2550. #define NewGXOpenConnectionProc(userRoutine)                     (GXOpenConnectionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXOpenConnectionProcInfo, GetCurrentArchitecture())
  2551. #define CallGXOpenConnectionProc(userRoutine)                     CALL_ZERO_PARAMETER_UPP((userRoutine), uppGXOpenConnectionProcInfo)
  2552. #define Send_GXOpenConnection() SendMessage(0x00000024)
  2553. #define Forward_GXOpenConnection() ForwardThisMessage((void *) (0))
  2554.  
  2555. typedef CALLBACK_API_C( OSErr , GXCloseConnectionProcPtr )(void );
  2556. typedef STACK_UPP_TYPE(GXCloseConnectionProcPtr)                 GXCloseConnectionUPP;
  2557. enum { uppGXCloseConnectionProcInfo = 0x00000021 };             /* 2_bytes Func() */
  2558. #define NewGXCloseConnectionProc(userRoutine)                     (GXCloseConnectionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCloseConnectionProcInfo, GetCurrentArchitecture())
  2559. #define CallGXCloseConnectionProc(userRoutine)                     CALL_ZERO_PARAMETER_UPP((userRoutine), uppGXCloseConnectionProcInfo)
  2560. #define Send_GXCloseConnection() SendMessage(0x00000025)
  2561. #define Forward_GXCloseConnection() ForwardThisMessage((void *) (0))
  2562.  
  2563. typedef CALLBACK_API_C( OSErr , GXStartSendPageProcPtr )(gxFormat theFormat);
  2564. typedef STACK_UPP_TYPE(GXStartSendPageProcPtr)                     GXStartSendPageUPP;
  2565. enum { uppGXStartSendPageProcInfo = 0x000000E1 };                 /* 2_bytes Func(4_bytes) */
  2566. #define NewGXStartSendPageProc(userRoutine)                     (GXStartSendPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXStartSendPageProcInfo, GetCurrentArchitecture())
  2567. #define CallGXStartSendPageProc(userRoutine, theFormat)         CALL_ONE_PARAMETER_UPP((userRoutine), uppGXStartSendPageProcInfo, (theFormat))
  2568. #define Send_GXStartSendPage(theFormat) SendMessage(0x00000026, theFormat)
  2569. #define Forward_GXStartSendPage(theFormat) ForwardThisMessage((void *) (theFormat))
  2570.  
  2571. typedef CALLBACK_API_C( OSErr , GXFinishSendPageProcPtr )(void );
  2572. typedef STACK_UPP_TYPE(GXFinishSendPageProcPtr)                 GXFinishSendPageUPP;
  2573. enum { uppGXFinishSendPageProcInfo = 0x00000021 };                 /* 2_bytes Func() */
  2574. #define NewGXFinishSendPageProc(userRoutine)                     (GXFinishSendPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFinishSendPageProcInfo, GetCurrentArchitecture())
  2575. #define CallGXFinishSendPageProc(userRoutine)                     CALL_ZERO_PARAMETER_UPP((userRoutine), uppGXFinishSendPageProcInfo)
  2576. #define Send_GXFinishSendPage() SendMessage(0x00000027)
  2577. #define Forward_GXFinishSendPage() ForwardThisMessage((void *) (0))
  2578.  
  2579. typedef CALLBACK_API_C( OSErr , GXWriteDataProcPtr )(Ptr data, long length);
  2580. typedef STACK_UPP_TYPE(GXWriteDataProcPtr)                         GXWriteDataUPP;
  2581. enum { uppGXWriteDataProcInfo = 0x000003E1 };                     /* 2_bytes Func(4_bytes, 4_bytes) */
  2582. #define NewGXWriteDataProc(userRoutine)                         (GXWriteDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXWriteDataProcInfo, GetCurrentArchitecture())
  2583. #define CallGXWriteDataProc(userRoutine, data, length)             CALL_TWO_PARAMETER_UPP((userRoutine), uppGXWriteDataProcInfo, (data), (length))
  2584. #define Send_GXWriteData(data, length) SendMessage(0x00000028, data, length)
  2585. #define Forward_GXWriteData(data, length) ForwardThisMessage((void *) (data), (void *) (length))
  2586.  
  2587. typedef CALLBACK_API_C( OSErr , GXBufferDataProcPtr )(Ptr data, long length, long bufferOptions);
  2588. typedef STACK_UPP_TYPE(GXBufferDataProcPtr)                     GXBufferDataUPP;
  2589. enum { uppGXBufferDataProcInfo = 0x00000FE1 };                     /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2590. #define NewGXBufferDataProc(userRoutine)                         (GXBufferDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXBufferDataProcInfo, GetCurrentArchitecture())
  2591. #define CallGXBufferDataProc(userRoutine, data, length, bufferOptions)  CALL_THREE_PARAMETER_UPP((userRoutine), uppGXBufferDataProcInfo, (data), (length), (bufferOptions))
  2592. #define Send_GXBufferData(data, length, bufferOptions) \
  2593.           SendMessage(0x00000029, data, length, bufferOptions)
  2594.  
  2595. #define Forward_GXBufferData(data, length, bufferOptions) \
  2596.           ForwardThisMessage((void *) (data), (void *) (length), (void *) (bufferOptions))
  2597.  
  2598. typedef CALLBACK_API_C( OSErr , GXDumpBufferProcPtr )(gxPrintingBuffer *theBuffer);
  2599. typedef STACK_UPP_TYPE(GXDumpBufferProcPtr)                     GXDumpBufferUPP;
  2600. enum { uppGXDumpBufferProcInfo = 0x000000E1 };                     /* 2_bytes Func(4_bytes) */
  2601. #define NewGXDumpBufferProc(userRoutine)                         (GXDumpBufferUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDumpBufferProcInfo, GetCurrentArchitecture())
  2602. #define CallGXDumpBufferProc(userRoutine, theBuffer)             CALL_ONE_PARAMETER_UPP((userRoutine), uppGXDumpBufferProcInfo, (theBuffer))
  2603. #define Send_GXDumpBuffer(theBuffer) SendMessage(0x0000002A, theBuffer)
  2604. #define Forward_GXDumpBuffer(theBuffer) ForwardThisMessage((void *) (theBuffer))
  2605.  
  2606. typedef CALLBACK_API_C( OSErr , GXFreeBufferProcPtr )(gxPrintingBuffer *theBuffer);
  2607. typedef STACK_UPP_TYPE(GXFreeBufferProcPtr)                     GXFreeBufferUPP;
  2608. enum { uppGXFreeBufferProcInfo = 0x000000E1 };                     /* 2_bytes Func(4_bytes) */
  2609. #define NewGXFreeBufferProc(userRoutine)                         (GXFreeBufferUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFreeBufferProcInfo, GetCurrentArchitecture())
  2610. #define CallGXFreeBufferProc(userRoutine, theBuffer)             CALL_ONE_PARAMETER_UPP((userRoutine), uppGXFreeBufferProcInfo, (theBuffer))
  2611. #define Send_GXFreeBuffer(theBuffer) SendMessage(0x0000002B, theBuffer)
  2612. #define Forward_GXFreeBuffer(theBuffer) ForwardThisMessage((void *) (theBuffer))
  2613.  
  2614. typedef CALLBACK_API_C( OSErr , GXCheckStatusProcPtr )(Ptr data, long length, long statusType, gxOwnerSignature owner);
  2615. typedef STACK_UPP_TYPE(GXCheckStatusProcPtr)                     GXCheckStatusUPP;
  2616. enum { uppGXCheckStatusProcInfo = 0x00003FE1 };                 /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  2617. #define NewGXCheckStatusProc(userRoutine)                         (GXCheckStatusUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCheckStatusProcInfo, GetCurrentArchitecture())
  2618. #define CallGXCheckStatusProc(userRoutine, data, length, statusType, owner)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppGXCheckStatusProcInfo, (data), (length), (statusType), (owner))
  2619. #define Send_GXCheckStatus(data, length, statusType, owner) \
  2620.           SendMessage(0x0000002C, data, length, statusType, owner)
  2621.  
  2622. #define Forward_GXCheckStatus(data, length, statusType, owner) \
  2623.           ForwardThisMessage((void *) (data), (void *) (length), (void *) (statusType), (void *) (owner))
  2624.  
  2625. typedef CALLBACK_API_C( OSErr , GXGetDeviceStatusProcPtr )(Ptr cmdData, long cmdSize, Ptr responseData, long *responseSize, Str255 termination);
  2626. typedef STACK_UPP_TYPE(GXGetDeviceStatusProcPtr)                 GXGetDeviceStatusUPP;
  2627. enum { uppGXGetDeviceStatusProcInfo = 0x0000FFE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  2628. #define NewGXGetDeviceStatusProc(userRoutine)                     (GXGetDeviceStatusUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXGetDeviceStatusProcInfo, GetCurrentArchitecture())
  2629. #define CallGXGetDeviceStatusProc(userRoutine, cmdData, cmdSize, responseData, responseSize, termination)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppGXGetDeviceStatusProcInfo, (cmdData), (cmdSize), (responseData), (responseSize), (termination))
  2630. #define Send_GXGetDeviceStatus(cmdData, cmdSize, responseData, responseSize, termination) \
  2631.           SendMessage(0x0000002D, cmdData, cmdSize, responseData, responseSize, termination)
  2632.  
  2633. #define Forward_GXGetDeviceStatus(cmdData, cmdSize, responseData, responseSize, termination) \
  2634.           ForwardThisMessage((void *) (cmdData), (void *) (cmdSize), (void *) (responseData), \
  2635.                                       (void *) (responseSize), (void *) (termination))
  2636.  
  2637. typedef CALLBACK_API_C( OSErr , GXFetchTaggedDataProcPtr )(ResType theType, long id, Handle *dataHdl, gxOwnerSignature owner);
  2638. typedef STACK_UPP_TYPE(GXFetchTaggedDataProcPtr)                 GXFetchTaggedDataUPP;
  2639. enum { uppGXFetchTaggedDataProcInfo = 0x00003FE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  2640. #define NewGXFetchTaggedDataProc(userRoutine)                     (GXFetchTaggedDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFetchTaggedDataProcInfo, GetCurrentArchitecture())
  2641. #define CallGXFetchTaggedDataProc(userRoutine, theType, id, dataHdl, owner)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppGXFetchTaggedDataProcInfo, (theType), (id), (dataHdl), (owner))
  2642. #define Send_GXFetchTaggedDriverData(tag, id, pHandle) Send_GXFetchTaggedData(tag, id, pHandle, 'drvr')
  2643. #define Forward_GXFetchTaggedDriverData(tag, id, pHandle) Forward_GXFetchTaggedData(tag, id, pHandle, 'drvr')
  2644. #define Send_GXFetchTaggedData(theType, id, dataHdl, owner) \
  2645.           SendMessage(0x0000002E, theType, id, dataHdl, owner)
  2646.  
  2647. #define Forward_GXFetchTaggedData(theType, id, dataHdl, owner) \
  2648.           ForwardThisMessage((void *) (theType), (void *) (id), (void *) (dataHdl), (void *) (owner))
  2649.  
  2650. typedef CALLBACK_API_C( OSErr , GXGetDTPMenuListProcPtr )(MenuHandle menuHdl);
  2651. typedef STACK_UPP_TYPE(GXGetDTPMenuListProcPtr)                 GXGetDTPMenuListUPP;
  2652. enum { uppGXGetDTPMenuListProcInfo = 0x000000E1 };                 /* 2_bytes Func(4_bytes) */
  2653. #define NewGXGetDTPMenuListProc(userRoutine)                     (GXGetDTPMenuListUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXGetDTPMenuListProcInfo, GetCurrentArchitecture())
  2654. #define CallGXGetDTPMenuListProc(userRoutine, menuHdl)             CALL_ONE_PARAMETER_UPP((userRoutine), uppGXGetDTPMenuListProcInfo, (menuHdl))
  2655. #define    Send_GXGetDTPMenuList(menuHdl) \
  2656.             SendMessage(0x0000002F, menuHdl)
  2657.  
  2658. #define    Forward_GXGetDTPMenuList(menuHdl) \
  2659.             ForwardThisMessage((void *) (menuHdl))
  2660.  
  2661. typedef CALLBACK_API_C( OSErr , GXDTPMenuSelectProcPtr )(long id);
  2662. typedef STACK_UPP_TYPE(GXDTPMenuSelectProcPtr)                     GXDTPMenuSelectUPP;
  2663. enum { uppGXDTPMenuSelectProcInfo = 0x000000E1 };                 /* 2_bytes Func(4_bytes) */
  2664. #define NewGXDTPMenuSelectProc(userRoutine)                     (GXDTPMenuSelectUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDTPMenuSelectProcInfo, GetCurrentArchitecture())
  2665. #define CallGXDTPMenuSelectProc(userRoutine, id)                 CALL_ONE_PARAMETER_UPP((userRoutine), uppGXDTPMenuSelectProcInfo, (id))
  2666. #define    Send_GXDTPMenuSelect(id) \
  2667.             SendMessage(0x00000030, id)
  2668.  
  2669. #define    Forward_GXDTPMenuSelect(id) \
  2670.             ForwardThisMessage((void *) (id))
  2671.  
  2672. typedef CALLBACK_API_C( OSErr , GXHandleAlertFilterProcPtr )(gxJob theJob, gxStatusRecord *pStatusRec, DialogPtr pDialog, EventRecord *theEvent, short *itemHit, Boolean *returnImmed);
  2673. typedef STACK_UPP_TYPE(GXHandleAlertFilterProcPtr)                 GXHandleAlertFilterUPP;
  2674. enum { uppGXHandleAlertFilterProcInfo = 0x0003FFE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  2675. #define NewGXHandleAlertFilterProc(userRoutine)                 (GXHandleAlertFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandleAlertFilterProcInfo, GetCurrentArchitecture())
  2676. #define CallGXHandleAlertFilterProc(userRoutine, theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed)  CALL_SIX_PARAMETER_UPP((userRoutine), uppGXHandleAlertFilterProcInfo, (theJob), (pStatusRec), (pDialog), (theEvent), (itemHit), (returnImmed))
  2677. #define    Send_GXHandleAlertFilter(theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed) \
  2678.             SendMessage(0x00000031, theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed)
  2679.  
  2680. #define    Forward_GXHandleAlertFilter(theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed) \
  2681.             ForwardThisMessage((void *) (theJob), (void *) (pStatusRec), (void *) (pDialog), (void *) (theEvent), \
  2682.                                      (void *) (itemHit), (void *) (returnImmed))
  2683.  
  2684. typedef CALLBACK_API_C( OSErr , GXJobFormatModeQueryProcPtr )(gxQueryType theQuery, void *srcData, void *dstData);
  2685. typedef STACK_UPP_TYPE(GXJobFormatModeQueryProcPtr)             GXJobFormatModeQueryUPP;
  2686. enum { uppGXJobFormatModeQueryProcInfo = 0x00000FE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2687. #define NewGXJobFormatModeQueryProc(userRoutine)                 (GXJobFormatModeQueryUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobFormatModeQueryProcInfo, GetCurrentArchitecture())
  2688. #define CallGXJobFormatModeQueryProc(userRoutine, theQuery, srcData, dstData)  CALL_THREE_PARAMETER_UPP((userRoutine), uppGXJobFormatModeQueryProcInfo, (theQuery), (srcData), (dstData))
  2689. #define Send_GXJobFormatModeQuery(theQuery, srcData, dstData) \
  2690.           SendMessage(0x00000032, theQuery, srcData, dstData)
  2691.  
  2692. #define Forward_GXJobFormatModeQuery(theQuery, srcData, dstData) \
  2693.           ForwardThisMessage((void *) (theQuery), (void *) (srcData), (void *) (dstData))
  2694.  
  2695. typedef CALLBACK_API_C( OSErr , GXWriteStatusToDTPWindowProcPtr )(gxStatusRecord *pStatusRec, gxDisplayRecord *pDisplay);
  2696. typedef STACK_UPP_TYPE(GXWriteStatusToDTPWindowProcPtr)         GXWriteStatusToDTPWindowUPP;
  2697. enum { uppGXWriteStatusToDTPWindowProcInfo = 0x000003E1 };         /* 2_bytes Func(4_bytes, 4_bytes) */
  2698. #define NewGXWriteStatusToDTPWindowProc(userRoutine)             (GXWriteStatusToDTPWindowUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXWriteStatusToDTPWindowProcInfo, GetCurrentArchitecture())
  2699. #define CallGXWriteStatusToDTPWindowProc(userRoutine, pStatusRec, pDisplay)  CALL_TWO_PARAMETER_UPP((userRoutine), uppGXWriteStatusToDTPWindowProcInfo, (pStatusRec), (pDisplay))
  2700. #define Send_GXWriteStatusToDTPWindow(pStatusRec, pDisplay) \
  2701.           SendMessage(0x00000033, pStatusRec, pDisplay)
  2702.  
  2703. #define Forward_GXWriteStatusToDTPWindow(pStatusRec, pDisplay) \
  2704.           ForwardThisMessage((void *) (pStatusRec), (void *) (pDisplay))
  2705.  
  2706. typedef CALLBACK_API_C( OSErr , GXInitializeStatusAlertProcPtr )(gxStatusRecord *pStatusRec, DialogPtr *pDialog);
  2707. typedef STACK_UPP_TYPE(GXInitializeStatusAlertProcPtr)             GXInitializeStatusAlertUPP;
  2708. enum { uppGXInitializeStatusAlertProcInfo = 0x000003E1 };         /* 2_bytes Func(4_bytes, 4_bytes) */
  2709. #define NewGXInitializeStatusAlertProc(userRoutine)             (GXInitializeStatusAlertUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXInitializeStatusAlertProcInfo, GetCurrentArchitecture())
  2710. #define CallGXInitializeStatusAlertProc(userRoutine, pStatusRec, pDialog)  CALL_TWO_PARAMETER_UPP((userRoutine), uppGXInitializeStatusAlertProcInfo, (pStatusRec), (pDialog))
  2711. #define Send_GXInitializeStatusAlert(pStatusRec, pDialog) \
  2712.           SendMessage(0x00000034, pStatusRec, pDialog)
  2713.  
  2714. #define Forward_GXInitializeStatusAlert(pStatusRec, pDialog) \
  2715.           ForwardThisMessage((void *) (pStatusRec), (void *) (pDialog))
  2716.  
  2717. typedef CALLBACK_API_C( OSErr , GXHandleAlertStatusProcPtr )(gxStatusRecord *pStatusRec);
  2718. typedef STACK_UPP_TYPE(GXHandleAlertStatusProcPtr)                 GXHandleAlertStatusUPP;
  2719. enum { uppGXHandleAlertStatusProcInfo = 0x000000E1 };             /* 2_bytes Func(4_bytes) */
  2720. #define NewGXHandleAlertStatusProc(userRoutine)                 (GXHandleAlertStatusUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandleAlertStatusProcInfo, GetCurrentArchitecture())
  2721. #define CallGXHandleAlertStatusProc(userRoutine, pStatusRec)     CALL_ONE_PARAMETER_UPP((userRoutine), uppGXHandleAlertStatusProcInfo, (pStatusRec))
  2722. #define Send_GXHandleAlertStatus(pStatusRec) \
  2723.           SendMessage(0x00000035, pStatusRec)
  2724.  
  2725. #define Forward_GXHandleAlertStatus(pStatusRec) \
  2726.           ForwardThisMessage((void *) (pStatusRec))
  2727.  
  2728. typedef CALLBACK_API_C( OSErr , GXHandleAlertEventProcPtr )(gxStatusRecord *pStatusRec, DialogPtr pDialog, EventRecord *theEvent, short *response);
  2729. typedef STACK_UPP_TYPE(GXHandleAlertEventProcPtr)                 GXHandleAlertEventUPP;
  2730. enum { uppGXHandleAlertEventProcInfo = 0x00003FE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  2731. #define NewGXHandleAlertEventProc(userRoutine)                     (GXHandleAlertEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandleAlertEventProcInfo, GetCurrentArchitecture())
  2732. #define CallGXHandleAlertEventProc(userRoutine, pStatusRec, pDialog, theEvent, response)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppGXHandleAlertEventProcInfo, (pStatusRec), (pDialog), (theEvent), (response))
  2733. #define Send_GXHandleAlertEvent(pStatusRec, pDialog, theEvent, response) \
  2734.           SendMessage(0x00000036, pStatusRec, pDialog, theEvent, response)
  2735.  
  2736. #define Forward_GXHandleAlertEvent(pStatusRec, pDialog, theEvent, response) \
  2737.           ForwardThisMessage((void *) (pStatusRec), (void *) (pDialog), \
  2738.                                       (void *) (theEvent), (void *) (response))
  2739.  
  2740. typedef CALLBACK_API_C( void , GXCleanupStartJobProcPtr )(void );
  2741. typedef STACK_UPP_TYPE(GXCleanupStartJobProcPtr)                 GXCleanupStartJobUPP;
  2742. enum { uppGXCleanupStartJobProcInfo = 0x00000001 };             /* no_return_value Func() */
  2743. #define NewGXCleanupStartJobProc(userRoutine)                     (GXCleanupStartJobUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCleanupStartJobProcInfo, GetCurrentArchitecture())
  2744. #define CallGXCleanupStartJobProc(userRoutine)                     CALL_ZERO_PARAMETER_UPP((userRoutine), uppGXCleanupStartJobProcInfo)
  2745. #define Send_GXCleanupStartJob() ((void) SendMessage(0x00000037))
  2746. #define Forward_GXCleanupStartJob() ((void) ForwardThisMessage((void *) (0)))
  2747.  
  2748. typedef CALLBACK_API_C( void , GXCleanupStartPageProcPtr )(void );
  2749. typedef STACK_UPP_TYPE(GXCleanupStartPageProcPtr)                 GXCleanupStartPageUPP;
  2750. enum { uppGXCleanupStartPageProcInfo = 0x00000001 };             /* no_return_value Func() */
  2751. #define NewGXCleanupStartPageProc(userRoutine)                     (GXCleanupStartPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCleanupStartPageProcInfo, GetCurrentArchitecture())
  2752. #define CallGXCleanupStartPageProc(userRoutine)                 CALL_ZERO_PARAMETER_UPP((userRoutine), uppGXCleanupStartPageProcInfo)
  2753. #define Send_GXCleanupStartPage() ((void) SendMessage(0x00000038))
  2754. #define Forward_GXCleanupStartPage() ((void) ForwardThisMessage((void *) (0)))
  2755.  
  2756. typedef CALLBACK_API_C( void , GXCleanupOpenConnectionProcPtr )(void );
  2757. typedef STACK_UPP_TYPE(GXCleanupOpenConnectionProcPtr)             GXCleanupOpenConnectionUPP;
  2758. enum { uppGXCleanupOpenConnectionProcInfo = 0x00000001 };         /* no_return_value Func() */
  2759. #define NewGXCleanupOpenConnectionProc(userRoutine)             (GXCleanupOpenConnectionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCleanupOpenConnectionProcInfo, GetCurrentArchitecture())
  2760. #define CallGXCleanupOpenConnectionProc(userRoutine)             CALL_ZERO_PARAMETER_UPP((userRoutine), uppGXCleanupOpenConnectionProcInfo)
  2761. #define Send_GXCleanupOpenConnection() ((void) SendMessage(0x00000039))
  2762. #define Forward_GXCleanupOpenConnection() ((void) ForwardThisMessage((void *) (0)))
  2763.  
  2764. typedef CALLBACK_API_C( void , GXCleanupStartSendPageProcPtr )(void );
  2765. typedef STACK_UPP_TYPE(GXCleanupStartSendPageProcPtr)             GXCleanupStartSendPageUPP;
  2766. enum { uppGXCleanupStartSendPageProcInfo = 0x00000001 };         /* no_return_value Func() */
  2767. #define NewGXCleanupStartSendPageProc(userRoutine)                 (GXCleanupStartSendPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCleanupStartSendPageProcInfo, GetCurrentArchitecture())
  2768. #define CallGXCleanupStartSendPageProc(userRoutine)             CALL_ZERO_PARAMETER_UPP((userRoutine), uppGXCleanupStartSendPageProcInfo)
  2769. #define Send_GXCleanupStartSendPage()  ((void) SendMessage(0x0000003A))
  2770. #define Forward_GXCleanupStartSendPage() ((void) ForwardThisMessage((void *) (0)))
  2771.  
  2772. typedef CALLBACK_API_C( OSErr , GXDefaultDesktopPrinterProcPtr )(Str31 dtpName);
  2773. typedef STACK_UPP_TYPE(GXDefaultDesktopPrinterProcPtr)             GXDefaultDesktopPrinterUPP;
  2774. enum { uppGXDefaultDesktopPrinterProcInfo = 0x000000E1 };         /* 2_bytes Func(4_bytes) */
  2775. #define NewGXDefaultDesktopPrinterProc(userRoutine)             (GXDefaultDesktopPrinterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultDesktopPrinterProcInfo, GetCurrentArchitecture())
  2776. #define CallGXDefaultDesktopPrinterProc(userRoutine, dtpName)     CALL_ONE_PARAMETER_UPP((userRoutine), uppGXDefaultDesktopPrinterProcInfo, (dtpName))
  2777. #define Send_GXDefaultDesktopPrinter(dtpName) SendMessage(0x0000003B, dtpName)
  2778. #define Forward_GXDefaultDesktopPrinter(dtpName) ForwardThisMessage((void *) (dtpName))
  2779.  
  2780. typedef CALLBACK_API_C( OSErr , GXCaptureOutputDeviceProcPtr )(Boolean capture);
  2781. typedef STACK_UPP_TYPE(GXCaptureOutputDeviceProcPtr)             GXCaptureOutputDeviceUPP;
  2782. enum { uppGXCaptureOutputDeviceProcInfo = 0x00000061 };         /* 2_bytes Func(1_byte) */
  2783. #define NewGXCaptureOutputDeviceProc(userRoutine)                 (GXCaptureOutputDeviceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCaptureOutputDeviceProcInfo, GetCurrentArchitecture())
  2784. #define CallGXCaptureOutputDeviceProc(userRoutine, capture)     CALL_ONE_PARAMETER_UPP((userRoutine), uppGXCaptureOutputDeviceProcInfo, (capture))
  2785. #define Send_GXCaptureOutputDevice(capture) SendMessage(0x0000003C, capture)
  2786. #define Forward_GXCaptureOutputDevice(capture) ForwardThisMessage((void *) (capture))
  2787.  
  2788. typedef CALLBACK_API_C( OSErr , GXOpenConnectionRetryProcPtr )(ResType theType, void *aVoid, Boolean *retryopenPtr, OSErr anErr);
  2789. typedef STACK_UPP_TYPE(GXOpenConnectionRetryProcPtr)             GXOpenConnectionRetryUPP;
  2790. enum { uppGXOpenConnectionRetryProcInfo = 0x00002FE1 };         /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes) */
  2791. #define NewGXOpenConnectionRetryProc(userRoutine)                 (GXOpenConnectionRetryUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXOpenConnectionRetryProcInfo, GetCurrentArchitecture())
  2792. #define CallGXOpenConnectionRetryProc(userRoutine, theType, aVoid, retryopenPtr, anErr)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppGXOpenConnectionRetryProcInfo, (theType), (aVoid), (retryopenPtr), (anErr))
  2793. #define Send_GXOpenConnectionRetry(theType, aVoid, retryopenPtr, anErr) \
  2794.           SendMessage(0x0000003D, theType, aVoid, retryopenPtr, anErr)
  2795.  
  2796. #define Forward_GXOpenConnectionRetry(theType, aVoid, retryopenPtr, anErr) \
  2797.           ForwardThisMessage((void *) (theType), (void *) (aVoid), (void *) (retryopenPtr), (void *) (anErr))
  2798.  
  2799. typedef CALLBACK_API_C( OSErr , GXExamineSpoolFileProcPtr )(gxSpoolFile theSpoolFile);
  2800. typedef STACK_UPP_TYPE(GXExamineSpoolFileProcPtr)                 GXExamineSpoolFileUPP;
  2801. enum { uppGXExamineSpoolFileProcInfo = 0x000000E1 };             /* 2_bytes Func(4_bytes) */
  2802. #define NewGXExamineSpoolFileProc(userRoutine)                     (GXExamineSpoolFileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXExamineSpoolFileProcInfo, GetCurrentArchitecture())
  2803. #define CallGXExamineSpoolFileProc(userRoutine, theSpoolFile)     CALL_ONE_PARAMETER_UPP((userRoutine), uppGXExamineSpoolFileProcInfo, (theSpoolFile))
  2804. #define Send_GXExamineSpoolFile(theSpoolFile) SendMessage(0x0000003E, theSpoolFile)
  2805. #define Forward_GXExamineSpoolFile(theSpoolFile) ForwardThisMessage((void *) (theSpoolFile))
  2806.  
  2807. typedef CALLBACK_API_C( OSErr , GXFinishSendPlaneProcPtr )(void );
  2808. typedef STACK_UPP_TYPE(GXFinishSendPlaneProcPtr)                 GXFinishSendPlaneUPP;
  2809. enum { uppGXFinishSendPlaneProcInfo = 0x00000021 };             /* 2_bytes Func() */
  2810. #define NewGXFinishSendPlaneProc(userRoutine)                     (GXFinishSendPlaneUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFinishSendPlaneProcInfo, GetCurrentArchitecture())
  2811. #define CallGXFinishSendPlaneProc(userRoutine)                     CALL_ZERO_PARAMETER_UPP((userRoutine), uppGXFinishSendPlaneProcInfo)
  2812. #define Send_GXFinishSendPlane() SendMessage(0x0000003F)
  2813. #define Forward_GXFinishSendPlane() ForwardThisMessage((void *) (0))
  2814.  
  2815. typedef CALLBACK_API_C( OSErr , GXDoesPaperFitProcPtr )(gxTrayIndex whichTray, gxPaperType paper, Boolean *fits);
  2816. typedef STACK_UPP_TYPE(GXDoesPaperFitProcPtr)                     GXDoesPaperFitUPP;
  2817. enum { uppGXDoesPaperFitProcInfo = 0x00000FE1 };                 /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2818. #define NewGXDoesPaperFitProc(userRoutine)                         (GXDoesPaperFitUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDoesPaperFitProcInfo, GetCurrentArchitecture())
  2819. #define CallGXDoesPaperFitProc(userRoutine, whichTray, paper, fits)  CALL_THREE_PARAMETER_UPP((userRoutine), uppGXDoesPaperFitProcInfo, (whichTray), (paper), (fits))
  2820. #define Send_GXDoesPaperFit(whichTray, paper, fits) \
  2821.           SendMessage(0x00000040, whichTray, paper, fits)
  2822.  
  2823. #define Forward_GXDoesPaperFit(whichTray, paper, fits) \
  2824.           ForwardThisMessage((void *) (whichTray), (void *) (paper), (void *) (fits))
  2825.  
  2826. typedef CALLBACK_API_C( OSErr , GXChooserMessageProcPtr )(long message, long caller, StringPtr objName, StringPtr zoneName, ListHandle theList, long p2);
  2827. typedef STACK_UPP_TYPE(GXChooserMessageProcPtr)                 GXChooserMessageUPP;
  2828. enum { uppGXChooserMessageProcInfo = 0x0003FFE1 };                 /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  2829. #define NewGXChooserMessageProc(userRoutine)                     (GXChooserMessageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXChooserMessageProcInfo, GetCurrentArchitecture())
  2830. #define CallGXChooserMessageProc(userRoutine, message, caller, objName, zoneName, theList, p2)  CALL_SIX_PARAMETER_UPP((userRoutine), uppGXChooserMessageProcInfo, (message), (caller), (objName), (zoneName), (theList), (p2))
  2831. #define Send_GXChooserMessage(message, caller, objName, zoneName, theList, p2) \
  2832.           SendMessage(0x00000041, message, caller, objName, zoneName, theList, p2)
  2833.  
  2834. #define Forward_GXChooserMessage(message, caller, objName, zoneName, theList, p2) \
  2835.           ForwardThisMessage((void *) (message), (void *) (caller), (void *) (objName), \
  2836.                                       (void *) (zoneName), (void *) (theList), (void *) (p2))
  2837.  
  2838. typedef CALLBACK_API_C( OSErr , GXFindPrinterProfileProcPtr )(gxPrinter thePrinter, void *searchData, long index, gxColorProfile *returnedProfile, long *numProfiles);
  2839. typedef STACK_UPP_TYPE(GXFindPrinterProfileProcPtr)             GXFindPrinterProfileUPP;
  2840. enum { uppGXFindPrinterProfileProcInfo = 0x0000FFE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  2841. #define NewGXFindPrinterProfileProc(userRoutine)                 (GXFindPrinterProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFindPrinterProfileProcInfo, GetCurrentArchitecture())
  2842. #define CallGXFindPrinterProfileProc(userRoutine, thePrinter, searchData, index, returnedProfile, numProfiles)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppGXFindPrinterProfileProcInfo, (thePrinter), (searchData), (index), (returnedProfile), (numProfiles))
  2843. #define Send_GXFindPrinterProfile(thePrinter, searchData, index, returnedProfile, numProfiles) \
  2844.           SendMessage(0x00000042, thePrinter, searchData, index, returnedProfile, numProfiles)
  2845.  
  2846. #define Forward_GXFindPrinterProfile(thePrinter, searchData, index, returnedProfile, numProfiles) \
  2847.           ForwardThisMessage((void *) (thePrinter), (void *) (searchData), (void *) (index), (void *) (returnedProfile), (void *) (numProfiles))
  2848.  
  2849. typedef CALLBACK_API_C( OSErr , GXFindFormatProfileProcPtr )(gxFormat theFormat, void *searchData, long index, gxColorProfile *returnedProfile, long *numProfiles);
  2850. typedef STACK_UPP_TYPE(GXFindFormatProfileProcPtr)                 GXFindFormatProfileUPP;
  2851. enum { uppGXFindFormatProfileProcInfo = 0x0000FFE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  2852. #define NewGXFindFormatProfileProc(userRoutine)                 (GXFindFormatProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFindFormatProfileProcInfo, GetCurrentArchitecture())
  2853. #define CallGXFindFormatProfileProc(userRoutine, theFormat, searchData, index, returnedProfile, numProfiles)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppGXFindFormatProfileProcInfo, (theFormat), (searchData), (index), (returnedProfile), (numProfiles))
  2854. #define Send_GXFindFormatProfile(theFormat, searchData, index, returnedProfile, numProfiles) \
  2855.           SendMessage(0x00000043, theFormat, searchData, index, returnedProfile, numProfiles)
  2856.  
  2857. #define Forward_GXFindFormatProfile(theFormat, searchData, index, returnedProfile, numProfiles) \
  2858.           ForwardThisMessage((void *) (theFormat), (void *) (searchData), (void *) (index), (void *) (returnedProfile), \
  2859.                                       (void *) (numProfiles))
  2860.  
  2861. typedef CALLBACK_API_C( OSErr , GXSetPrinterProfileProcPtr )(gxPrinter thePrinter, gxColorProfile oldProfile, gxColorProfile newProfile);
  2862. typedef STACK_UPP_TYPE(GXSetPrinterProfileProcPtr)                 GXSetPrinterProfileUPP;
  2863. enum { uppGXSetPrinterProfileProcInfo = 0x00000FE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2864. #define NewGXSetPrinterProfileProc(userRoutine)                 (GXSetPrinterProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSetPrinterProfileProcInfo, GetCurrentArchitecture())
  2865. #define CallGXSetPrinterProfileProc(userRoutine, thePrinter, oldProfile, newProfile)  CALL_THREE_PARAMETER_UPP((userRoutine), uppGXSetPrinterProfileProcInfo, (thePrinter), (oldProfile), (newProfile))
  2866. #define Send_GXSetPrinterProfile(thePrinter, oldProfile, newProfile) \
  2867.           SendMessage(0x00000044, thePrinter, oldProfile, newProfile)
  2868.  
  2869. #define Forward_GXSetPrinterProfile(thePrinter, oldProfile, newProfile) \
  2870.           ForwardThisMessage((void *) (thePrinter), (void *) (oldProfile), (void *) (newProfile))
  2871.  
  2872. typedef CALLBACK_API_C( OSErr , GXSetFormatProfileProcPtr )(gxFormat theFormat, gxColorProfile oldProfile, gxColorProfile newProfile);
  2873. typedef STACK_UPP_TYPE(GXSetFormatProfileProcPtr)                 GXSetFormatProfileUPP;
  2874. enum { uppGXSetFormatProfileProcInfo = 0x00000FE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2875. #define NewGXSetFormatProfileProc(userRoutine)                     (GXSetFormatProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSetFormatProfileProcInfo, GetCurrentArchitecture())
  2876. #define CallGXSetFormatProfileProc(userRoutine, theFormat, oldProfile, newProfile)  CALL_THREE_PARAMETER_UPP((userRoutine), uppGXSetFormatProfileProcInfo, (theFormat), (oldProfile), (newProfile))
  2877. #define Send_GXSetFormatProfile(theFormat, oldProfile, newProfile) \
  2878.           SendMessage(0x00000045, theFormat, oldProfile, newProfile)
  2879.  
  2880. #define Forward_GXSetFormatProfile(theFormat, oldProfile, newProfile) \
  2881.           ForwardThisMessage((void *) (theFormat), (void *) (oldProfile), (void *) (newProfile))
  2882.  
  2883. typedef CALLBACK_API_C( OSErr , GXHandleAltDestinationProcPtr )(Boolean *userCancels);
  2884. typedef STACK_UPP_TYPE(GXHandleAltDestinationProcPtr)             GXHandleAltDestinationUPP;
  2885. enum { uppGXHandleAltDestinationProcInfo = 0x000000E1 };         /* 2_bytes Func(4_bytes) */
  2886. #define NewGXHandleAltDestinationProc(userRoutine)                 (GXHandleAltDestinationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandleAltDestinationProcInfo, GetCurrentArchitecture())
  2887. #define CallGXHandleAltDestinationProc(userRoutine, userCancels)  CALL_ONE_PARAMETER_UPP((userRoutine), uppGXHandleAltDestinationProcInfo, (userCancels))
  2888. #define Send_GXHandleAltDestination(userCancels) SendMessage(0x00000046, userCancels)
  2889. #define Forward_GXHandleAltDestination(userCancels) ForwardThisMessage((void *) (userCancels))
  2890.  
  2891. typedef CALLBACK_API_C( OSErr , GXSetupPageImageDataProcPtr )(gxFormat theFormat, gxShape thePage, void *imageData);
  2892. typedef STACK_UPP_TYPE(GXSetupPageImageDataProcPtr)             GXSetupPageImageDataUPP;
  2893. enum { uppGXSetupPageImageDataProcInfo = 0x00000FE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2894. #define NewGXSetupPageImageDataProc(userRoutine)                 (GXSetupPageImageDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSetupPageImageDataProcInfo, GetCurrentArchitecture())
  2895. #define CallGXSetupPageImageDataProc(userRoutine, theFormat, thePage, imageData)  CALL_THREE_PARAMETER_UPP((userRoutine), uppGXSetupPageImageDataProcInfo, (theFormat), (thePage), (imageData))
  2896. #define Send_GXSetupPageImageData(theFormat, thePage, imageData) \
  2897.           SendMessage(0x00000047, theFormat, thePage, imageData)
  2898.  
  2899. #define Forward_GXSetupPageImageData(theFormat, thePage, imageData) \
  2900.           ForwardThisMessage((void *) (theFormat), (void *) (thePage), (void *) (imageData))
  2901. /*******************************************************************
  2902.                     Start of old "GXPrintingErrors.h/a/p" interface file.
  2903.             ********************************************************************/
  2904.  
  2905. enum {
  2906.     gxPrintingResultBase        = -510                            /*First QuickDraw GX printing error code.*/
  2907. };
  2908.  
  2909. /*RESULT CODES FOR QUICKDRAW GX PRINTING OPERATIONS*/
  2910.  
  2911. enum {
  2912.     gxAioTimeout                = (gxPrintingResultBase),        /*-510 : Timeout condition occurred during operation*/
  2913.     gxAioBadRqstState            = (gxPrintingResultBase - 1),    /*-511 : Async I/O request in invalid state for operation*/
  2914.     gxAioBadConn                = (gxPrintingResultBase - 2),    /*-512 : Invalid Async I/O connection refnum*/
  2915.     gxAioInvalidXfer            = (gxPrintingResultBase - 3),    /*-513 : Read data transfer structure contained bad values*/
  2916.     gxAioNoRqstBlks                = (gxPrintingResultBase - 4),    /*-514 : No available request blocks to process request*/
  2917.     gxAioNoDataXfer                = (gxPrintingResultBase - 5),    /*-515 : Data transfer structure pointer not specified*/
  2918.     gxAioTooManyAutos            = (gxPrintingResultBase - 6),    /*-516 : Auto status request already active*/
  2919.     gxAioNoAutoStat                = (gxPrintingResultBase - 7),    /*-517 : Connection not configured for auto status*/
  2920.     gxAioBadRqstID                = (gxPrintingResultBase - 8),    /*-518 : Invalid I/O request identifier*/
  2921.     gxAioCantKill                = (gxPrintingResultBase - 9),    /*-519 : Comm. protocol doesn't support I/O term*/
  2922.     gxAioAlreadyExists            = (gxPrintingResultBase - 10),    /*-520 : Protocol spec. data already specified*/
  2923.     gxAioCantFind                = (gxPrintingResultBase - 11),    /*-521 : Protocol spec. data does not exist*/
  2924.     gxAioDeviceDisconn            = (gxPrintingResultBase - 12),    /*-522 : Machine disconnected from printer*/
  2925.     gxAioNotImplemented            = (gxPrintingResultBase - 13),    /*-523 : Function not implemented*/
  2926.     gxAioOpenPending            = (gxPrintingResultBase - 14),    /*-524 : Opening a connection for protocol, but another open pending*/
  2927.     gxAioNoProtocolData            = (gxPrintingResultBase - 15),    /*-525 : No protocol specific data specified in request*/
  2928.     gxAioRqstKilled                = (gxPrintingResultBase - 16),    /*-526 : I/O request was terminated*/
  2929.     gxBadBaudRate                = (gxPrintingResultBase - 17),    /*-527 : Invalid baud rate specified*/
  2930.     gxBadParity                    = (gxPrintingResultBase - 18),    /*-528 : Invalid parity specified*/
  2931.     gxBadStopBits                = (gxPrintingResultBase - 19),    /*-529 : Invalid stop bits specified*/
  2932.     gxBadDataBits                = (gxPrintingResultBase - 20),    /*-530 : Invalid data bits specified*/
  2933.     gxBadPrinterName            = (gxPrintingResultBase - 21),    /*-531 : Bad printer name specified*/
  2934.     gxAioBadMsgType                = (gxPrintingResultBase - 22),    /*-532 : Bad masType field in transfer info structure*/
  2935.     gxAioCantFindDevice            = (gxPrintingResultBase - 23),    /*-533 : Cannot locate target device*/
  2936.     gxAioOutOfSeq                = (gxPrintingResultBase - 24),    /*-534 : Non-atomic SCSI requests submitted out of sequence*/
  2937.     gxPrIOAbortErr                = (gxPrintingResultBase - 25),    /*-535 : I/O operation aborted*/
  2938.     gxPrUserAbortErr            = (gxPrintingResultBase - 26),    /*-536 : User aborted*/
  2939.     gxCantAddPanelsNowErr        = (gxPrintingResultBase - 27),    /*-537 : Can only add panels during driver switch or dialog setup*/
  2940.     gxBadxdtlKeyErr                = (gxPrintingResultBase - 28),    /*-538 : Unknown key for xdtl - must be radiobutton, etc*/
  2941.     gxXdtlItemOutOfRangeErr        = (gxPrintingResultBase - 29),    /*-539 : Referenced item does not belong to panel*/
  2942.     gxNoActionButtonErr            = (gxPrintingResultBase - 30),    /*-540 : Action button is nil*/
  2943.     gxTitlesTooLongErr            = (gxPrintingResultBase - 31),    /*-541 : Length of buttons exceeds alert maximum width*/
  2944.     gxUnknownAlertVersionErr    = (gxPrintingResultBase - 32),    /*-542 : Bad version for printing alerts*/
  2945.     gxGBBufferTooSmallErr        = (gxPrintingResultBase - 33),    /*-543 : Buffer too small.*/
  2946.     gxInvalidPenTable            = (gxPrintingResultBase - 34),    /*-544 : Invalid vector driver pen table.*/
  2947.     gxIncompletePrintFileErr    = (gxPrintingResultBase - 35),    /*-545 : Print file was not completely spooled*/
  2948.     gxCrashedPrintFileErr        = (gxPrintingResultBase - 36),    /*-546 : Print file is corrupted*/
  2949.     gxInvalidPrintFileVersion    = (gxPrintingResultBase - 37),    /*-547 : Print file is incompatible with current QuickDraw GX version*/
  2950.     gxSegmentLoadFailedErr        = (gxPrintingResultBase - 38),    /*-548 : Segment loader error*/
  2951.     gxExtensionNotFoundErr        = (gxPrintingResultBase - 39),    /*-549 : Requested printing extension could not be found*/
  2952.     gxDriverVersionErr            = (gxPrintingResultBase - 40),    /*-550 : Driver too new for current version of QuickDraw GX*/
  2953.     gxImagingSystemVersionErr    = (gxPrintingResultBase - 41),    /*-551 : Imaging system too new for current version of QuickDraw GX*/
  2954.     gxFlattenVersionTooNew        = (gxPrintingResultBase - 42),    /*-552 : Flattened object format too new for current version of QDGX*/
  2955.     gxPaperTypeNotFound            = (gxPrintingResultBase - 43),    /*-553 : Requested papertype could not be found*/
  2956.     gxNoSuchPTGroup                = (gxPrintingResultBase - 44),    /*-554 : Requested papertype group could not be found*/
  2957.     gxNotEnoughPrinterMemory    = (gxPrintingResultBase - 45),    /*-555 : Printer does not have enough memory for fonts in document*/
  2958.     gxDuplicatePanelNameErr        = (gxPrintingResultBase - 46),    /*-556 : Attempt to add more than 10 panels with the same name*/
  2959.     gxExtensionVersionErr        = (gxPrintingResultBase - 47)    /*-557 : Extension too new for current version of QuickDraw GX*/
  2960. };
  2961.  
  2962.  
  2963.  
  2964.  
  2965. #if PRAGMA_STRUCT_ALIGN
  2966.     #pragma options align=reset
  2967. #elif PRAGMA_STRUCT_PACKPUSH
  2968.     #pragma pack(pop)
  2969. #elif PRAGMA_STRUCT_PACK
  2970.     #pragma pack()
  2971. #endif
  2972.  
  2973. #ifdef PRAGMA_IMPORT_OFF
  2974. #pragma import off
  2975. #elif PRAGMA_IMPORT
  2976. #pragma import reset
  2977. #endif
  2978.  
  2979. #ifdef __cplusplus
  2980. }
  2981. #endif
  2982.  
  2983. #endif /* __GXPRINTING__ */
  2984.  
  2985.